"conda install -c conda-forge python" causes anaconda distribution to stop working

Question:

I tried running conda install -c conda-forge python. The installed python package causes Anaconda python to stop working. When I type python on the console, nothing happens. Did anyone encounter the same problem? Any fixes?

The latest python version v3.9.13 from conda-forge channel will break the anaconda package, at least on my PC. I don’t know if anyone else faces the same problem.

I am using Windows 10. I am running Anaconda 2022.05.

Update: I no longer face any problem with python v3.9.13 from conda-forge channel. I do not even have to run the solution provided in the answer. Maybe the Anaconda team did something to fix the problem I faced.

Asked By: user3848207

||

Answers:

TLDR; You need to activate the environment with conda activate base to use it in the command prompt in windows. (check below for more details, including virtual env)

Explaination

Even though you have installed python with conda install -c conda-forge python, this probably happened to your base environment, which is still inaccessible because you need to do conda activate base (in Linux OS conda source base). This is done to run python successfully outside the anaconda prompt (you seem to be using cmd with admin privileges).

Also like others mentioned in the comments, conda is usually used to make isolated environments for each application. As seen per the documentation, and below:

conda create -n <env_name>

conda activate <env_name>

conda install -c conda_forge python (This can be combined into the first line, by adding python after <env_name>, even with a specific version like python=3.8)

Answered By: Warkaz
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.