Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Anaconda base environment in Pycharm?

I am trying to set up base environment of Anaconda to use in PyCharm. There is no such option in the settings (either "system interpreter" or "create new environment"; I had to use "system interpreter"). I managed to setup "activate.bat" for the terminal, but "base" environment is not activated during debug or usual runs - as a result I get errors (compared to just run in Anaconda console - everything is fine). What should I do?

like image 911
Paul Morozov Avatar asked Mar 12 '19 08:03

Paul Morozov


3 Answers

You need to select python.exe from the base Anaconda, e.g.

enter image description here

It's also a better choice to use 2019.1 EAP build, as there's a fix to conda activation in the terminal there. You don't really need to select activate.bat as a terminal.

like image 82
Pavel Karateev Avatar answered Oct 08 '22 09:10

Pavel Karateev


I'm a Mac OS user (Catalina).

I found my Conda base environment here: /Users/donald/anaconda3/bin/python3

Fortunately pip3 and Conda (base) work together pretty seamlessly with this setup. So this environment should show up as "Python 3.8 (base)" (or similar) separate from your other Conda environments.

Mac OS New Project Interpreter Setup

like image 26
donjpierce Avatar answered Oct 08 '22 08:10

donjpierce


I am using macOS and I have got the base python environment in the following location

/opt/anaconda3/bin/python3

Just add in the location in the interpreter section under existing environment option

like image 38
Gunjan Paul Avatar answered Oct 08 '22 09:10

Gunjan Paul