Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda activate fails while environment variable PYTHONHOME is defined #578

Open
hoo-ray opened this issue Jul 12, 2021 · 0 comments
Open

Comments

@hoo-ray
Copy link

hoo-ray commented Jul 12, 2021

I am working for a large company and have a user account without administrator privileges. The machine I am using is a virtual machine that gets reset to virgin state every night. There are two Python installations on this machine:

  1. Python 2.7 in C:\Program Files; this installation is managed by our IT department and I cannot modify it
  2. Python 3.7 in C:\MyPython; this Anaconda installation is managed by me and I can modify it

The problem is that there is a system environment variable defined by my IT department: PYTHONHOME=C:\Program Files\Python27
This variable causes "conda activate" to fail because during activation conda obviously respects the wrong value of PYTHONHOME.
You can reproduce the issue by setting PYTHONHOME in the system environment to some arbitrary path that does not even have to exist (i.e. no parallel python installation is required) and then try to activate conda.
I my eyes it is an invalid concept to respect PYTHONHOME during activation/initialization. The whole purpose of calling "conda activate" is to initialize the environment and bring it into a well defined state. Any existing value of PYTHONHOME should be overridden!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant