Is there support within PyCharm/CLion to activate a conda env which is being used to execute a given python script? Currently, when I configure a conda env as the interpreter to be used to execute a given script, PyCharm/CLion do not activate the environment before executing the script. If this is not done, any environment variables settings defined in activate.d/env_vars.[sh|bat] are not applied.
Asked
Active
Viewed 1,586 times
1 Answers
0
As of now, I believe there is not. I had issues with this as well. A workaround would be do re-install Anaconda and tick the "add to path" option, or you can launch PyCharm from the prompt in which you activate your conda environment.

Psychotechnopath
- 2,471
- 5
- 26
- 47
-
1How would this address anything related to environment variables? The issue is not that the package is missing from the path but how the interpreter gets initialized. – mcguip Oct 31 '18 at 19:50
-
Well, If you just point the python interpreter to the conda env python.exe you are using, it doesn't get automatically activated, and I don't think there is a way to do this in PyCharm (as of now). Running scripts from an unactivated conda environment can lead to problems, since it's unsupported. I believe the issue you mention is a known issue, maybe one of these resources can help you: [Stackoverflow post](https://stackoverflow.com/questions/48924787/pycharm-terminal-doesnt-activate-conda-environment?noredirect=1&lq=1) [Jetbrains bug report](https://youtrack.jetbrains.com/issue/PY-23417) – Psychotechnopath Nov 14 '18 at 13:13