PyCharm CE
and Anaconda
have been installed.
I know I should create a symlink
to $HOME/.anaconda
, but what is the command on macOS/Linux ?
Or any other solution?
Thx
You can set which interpreter to use within PyCharm. First you can go to your terminal and check:
$ python --version
You may see something like this:
$ Python 3.6.4 :: Anaconda, Inc.
Verify the path to your interpreter:
which python
or
$ python
>>> import sys
>>> sys.executable
'/anaconda3/bin/python'
Now go to PyCharm and navigate to:
pycharm > preferences (or simply ⌘, ) > project > project interpreter > settings icon > add local > system interpreter > ... button > /anaconda3/bin/python3.6
click apply
You'll have to scroll up to get to your anaconda directory and essentially manually set the project interpreter path to your sys.executable path by clicking through subdirectories.
For 2020 readers, I'm using Mac OSX:
In PyCharm, click the Terminal Tab at the bottom, type
which python
and notice whether there is a .../.conda/...
shown in the path. In my case:
/Users/raining/.conda/envs/ExampleProject/bin/python
If so, you're actually using anaconda's python(interpreter).
python --version
only showed Python 3.8.5
, no info. about Anaconda.Add the path in ~/.bashrc
such as
export PATH="/anaconda3/bin:$PATH"
Then, PyCharm CE
can be worked with Anaconda
.
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.