Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm: Anaconda installation is not found

I had Anaconda on Windows 10 installed in C:\ProgramData\Anaconda3 before using PyCharm. Now PyCharm displays: "Anaconda installation is not found" when I try using a conda env.

I also added Anaconda to PATH.

Is there a way to show PyCharm where Anaconda is installed?

like image 951
AstronAUT Avatar asked Dec 04 '17 00:12

AstronAUT


People also ask

How do I install PyCharm on Anaconda Navigator?

Open the Anaconda Navigator, click "File" - "Preferences", add the directory path of Pycharm in the "Pycharm Pro path" or "Pycharm CE path", depending on your Pycharm type. The directory path here should be the whole directory, for example, "C:\Pycharm". Wish it helps!

Can not install Anaconda?

Anaconda installs and updates can silently fail due to conflicts with 3rd party antivirus (for me it's WebRoot ) programs. An indicator of Anaconda antivirus conflicts is missing .exe and . bat files, and sometimes requests to reboot. The fix is to shutdown the antivirus program and reinstall Anaconda .


2 Answers

There is an open bug, currently PyCharm and IDEA both seem to detect Conda installation only from %HOMEPATH%/anaconda. https://youtrack.jetbrains.com/issue/PY-26923

The easiest workaround is to create a symlink to $HOME/.anaconda

mklink /D %HOMEDRIVE%%HOMEPATH%\anaconda C:\ProgramData\Anaconda3 

Note that C:\ProgramData\Anaconda3 should be replaced with the path to your Anconda installation. If you selected to installed it for "Just Me" instead of "All Users", your default location will be

C:\Users\<your_username>\AppData\Local\Continuum\anaconda3 

UPDATE: This issue is now fixed in IDEA and PyCharm since version 2018.1. You can specify a custom path under Python Interpreter or SDK settings in Conda Environment section.

like image 112
Ahti Kitsik Avatar answered Oct 04 '22 03:10

Ahti Kitsik


In @Ahti Kitsik's answer above, the following line did not work, and resulted in a an error: mklink /D %HOMEPATH%\anaconda C:\ProgramData\Anaconda3

Because of a different install location, the following worked for me:

mklink /D "%HOMEPATH%\anaconda" "C:\Dev\Anaconda3" 

"C:\Dev\Anaconda3" should be the anaconda installation folder on your PC.

Also, be sure to run the cmd with administrator privilege, otherwise you will get a permission error when trying to create the symlink.

like image 43
Chenhua Avatar answered Oct 04 '22 04:10

Chenhua