alrightapril
alrightapril

Reputation: 53

conda executable not found in pycharm

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

Answers (4)

edd313
edd313

Reputation: 1479

None of the solutions worked for me unfortunately, what did was

  1. Add local interpreter
  2. Select Conda Environment
  3. Add the conda executable in the Scripts folder (...miniconda3\Scripts\conda.exe)
  4. Load Environments
  5. Select existing environment

I am using Miniconda3, and PyCharm 2023.1.1

Upvotes: 3

APP Bird
APP Bird

Reputation: 1381

on pycharm add

/usr/bin/conda

as Path to conda

Upvotes: 0

Stanton Lau
Stanton Lau

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:

enter image description here

Upvotes: 13

LayneZhao
LayneZhao

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

Related Questions