Search code examples
pythonpycharmanacondaconda

Cannot add conda environment to Pycharm - Conda executable path is empty even when it's not


I am pretty proficient in pycharm but it is the first time I stumble into this problem.

  1. I created a conda environment
  2. Finding the conda executable which for me is in /home/my_username/.miniconda3/envs/py39/bin/python
  3. Adding it to pycharm results in: enter image description here

I tried to search for this issue and error but the results didnt help. I am using fedora 36 if it is relevant.

Edit: The output of which conda is:

/home/my_username/.miniconda3/condabin/conda

Then trying to add it as the interpreter as suggested in Pycharm: Conda executable path is empty: enter image description here


Solution

    1. click the 'add interpreter'-'Add local interpreter';
    2. click 'Conda Environment' on the left panel, browse and select 'yourAnacondaDir\Scripts\conda.exe';
    3. click 'load Environment';
    4. then two options: 'use existing environment' and 'create new environment' show up;
    5. click the first option;
    6. In the 'Use existing environment' box, select 'your_env'