简体   繁体   中英

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

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.

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 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM