简体   繁体   中英

cmd warning: python interpreter is in a conda environment, but the environment has not been activated

I installed Anaconda (added to path) but when I try to run Python from the cmd, I get the following message:

Warning: This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda.io/activation

I followed the link and tried to activate the environment, but my cmd then changes to (base) mode, which I am unfamiliar with.

Follow below steps

1)open cmd and type "conda activate base"

2)then type python

Which will satisfy your problem

Refer https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

Earlier versions of conda introduced scripts to make activation behavior uniform across operating systems. Conda 4.4 allowed conda activate myenv. Conda 4.6 added extensive initialization support so that conda works faster and less disruptively on a wide variety of shells (bash, zsh, csh, fish, xonsh, and more). Now these shells can use the conda activate command. Removing the need to modify PATH makes conda less disruptive to other software on your system. For more information, read the output from conda init --help.

One setting may be useful to you when using conda init is:

auto_activate_base: bool

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