Reputation: 53
I want to use my conda environment in pycharm. But there was no option at all:enter image description here
The python executable does not exist in the drop down menu: enter image description here
however I have no problem activating the environment from command prompt. And the PATH for executable is present for this virtual env:
shutil.which('python')
'C:\\Users\\<my user name>\\AppData\\Local\\anaconda3\\envs\\physioNet\\python.EXE'
although strangely enough, where python
yields nothing.
I am using windows and latest version of pycharm (2023.1.2). I have also already seen https://stackoverflow.com/questions/73538040/cannot-add-conda-environment-to-pycharm-conda-executable-path-is-empty-even-wh and https://stackoverflow.com/questions/49714910/anaconda-not-available-in-pycharm
I am not really a proficient user in such an area so any idea would be greatly appreciated.
Upvotes: 4
Views: 12704
Reputation: 1479
None of the solutions worked for me unfortunately, what did was
I am using Miniconda3, and PyCharm 2023.1.1
Upvotes: 3
Reputation: 184
yeah, i encounter this question that is same with you. now i have fixed it successfully.
step 1: click " add local interpreter"
step 2: click " conda environment" enter image description here
step 3: instead of selecting python.exe
, choose fold "condabin
",and then select file "conda.bat
"
enter image description here
and then Step 4: click "load environment
" button
and then i think you will find "existing environment" and " create new environment" like this:
Upvotes: 13
Reputation: 1
You should load the conda environment instead of the python environment. I use the miniforge in macOS,conda enviroment is located at miniforge/bin/conda. then,you can use existing python environment. enter image description here
Upvotes: 0