1

I am trying to follow the documentation provided by Anaconda as well as their troubleshooting guide. The problem still persists however.

I see similar questions here and here, however the details are where my problem differs and anyway, the answers provided do not work for me.

I am working on a corporate server, where I have administrator rights, but where I do not have access to the Internet.

  • OS: Windows Server 2016 (v10.0.14393)
  • Anaconda: V2020.02 py37_0
  • Conda: V4.8.2

The Anaconda installation was done as an administrator and the not-recommended option of adding to PATH was enabled. This is how my PATH looks like at the moment (redacted entries are company specific and not relevant here):

System PATH

The following are the Conda-specific steps that I ran from Anaconda Prompt (PowerShell):

  1. conda create --prefix ./envs --offline: Create a Conda environment with --prefix and --offline flags. This is to create the environment within my project root folder (in an offline manner).
  2. conda activate D:\conda_project\envs: Activate the environment
  3. conda install \path\to\numpy\tar\from\conda-forge: Install NumPy in the activated virtual environment
  4. python: Run Python console

And this is where I can't just seem to get rid of the 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 have verified that the Conda environment is activated based on the appearance in the shell and based on conda info --envs:

Verified that environment is activated

Finally, here is the screenshot of the error that I reported (in a Python console):

Python console thinks the Conda environment is not activated

I have also gone through a similar process by trying to setup a Conda environment using the --name flag instead of the --prefix flag (so it creates the environment in Anaconda's env/ folder). The result has been the same.

What am I doing wrong here?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Chaos
  • 466
  • 1
  • 5
  • 12
  • 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

0 Answers0