简体   繁体   中英

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?

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.

You can't find anaconda python in your console at first.Click Configure Interpreters in blue.

在此输入图像描述

Click the little gear under reset in blue(right + up corner), and chose 'add local'. 在此输入图像描述 point to your python in anaconda

在此输入图像描述

Here you are

在此输入图像描述

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.

I fixed this by:

  • Uninstalling the Anaconda that was installed with Visual Studio 2017. I did this by unticking the option within the VS2017 installer.
  • Installing Anaconda after downloading the official installer .
  • Rebooting my PC.

My theory is that VS2017 installs Anaconda in a non-default location, and PyCharm cannot find it. The Anaconda installer states that VS2017 should still work fine with Python, even after this change.

I faced the same issue on Ubuntu 16.04 where I had Anaconda installed under ~/.local/opt/anaconda3 . Creating a symlink under ~/anaconda3 solved the issue for me.

mklink / D%HOMEDRIVE %% HOMEPATH%\\ anaconda“C:\\ Program Files \\ Anaconda3”

I had a similar problem running linux (Ubuntu) because I installed anaconda to a custom location. Creating a symbolic link to anaconda in home directory solved the problem.

You can run the following command to do that:

ln -s /_my_custom_path_to_/anaconda3/ /home/_my_user_name_/anaconda3

* keep in mind _my_custom_path_to_ and _my_user_name_/ are your custom path to anaconda and user name correspondingly

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM