1

I have been using a working Anaconda install (Python 3.7) for about a year, but suddenly I'm getting this warning when I run the interpreter:

> python
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32

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

Type "help", "copyright", "credits" or "license" for more information.
>>>

I quite often use virtual environments, but never with Conda. Note that I've been able to run Python from the command line with just python for a long time now, and have never had to use conda activate base. I don't even have Conda on my path.

I've found these answers, but neither gives any clarity into why this may have started happening:

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
Viglione
  • 4,942
  • 2
  • 21
  • 45
  • I guess you should use 'anaconda prompt' instead of 'cmd'. It is basically cmd + conda activation which is adding all the necessary paths into 'path' variables. I have zero anaconda records in windows environment variables however I don't have problems with anaconda prompt, spyder and pycharm. – Poolka Feb 09 '21 at 14:52
  • Related: *[Python is in a Conda environment, but it has not been activated in a Windows virtual environment](https://stackoverflow.com/questions/56679132/)* – Peter Mortensen Oct 26 '21 at 19:59

1 Answers1

0

I have the same problem, by following this post conda-is-not-recognized-as-internal-or-external-command, I am able to solve the problem.

The reason may be that your default Python interpreter has been switch to the the Conda python (e.g. on my Wondows 10, the path is C:\Users\Xiang\anaconda3\python.exe). Therefore, we need to add the Conda related path to the Environments Path, with details explained in the link.

XYZ
  • 168
  • 3
  • 14