Use Conda environment in pycharm

后端 未结 6 2013
南方客
南方客 2020-11-28 05:41

Conda env is activated using source activate env_name.

How can I activate the environment in pycharm ?

6条回答
  •  我在风中等你
    2020-11-28 05:53

    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

提交回复
热议问题