pythonpycharmcondaanaconda3

Use Conda environment in pycharm


Conda env is activated using source activate env_name.

How can I activate the environment in pycharm ?


Solution

  • The best PyCharm specific answer is this one by wasabi (below).

    In general though, if you want to use an interpreter from within a Conda environment then you can change the location of the interpreter to point to the particular environment that you want to use e.g. /home/username/miniconda/envs/bunnies as mentioned in this comment.

    However, as mentioned in this answer by Mark Turner, it is possible to have a shell script executed when activating an environment. This method will not run that shell script, but you can follow his workaround if you need that shell script run:

    • open a conda prompt
    • activate the environment
    • run pycharm from the conda prompt