I'm on Ubuntu 16.04. I went to File > Default Settings > Project Interpreter > add local
and browsed to my anconda3/long/path/python3.6
. When I open a new project or file the anaconda interpreter is NOT chosen, and instead a virtual environment based on the systems default python3 interpreter is created in /home/myname/venv
and is used. To change it I need to go into settings, search for "interpreter" and choose the anaconda3 I added earlier, but that's a hassle!
How can I get PyCharm to use the Anaconda3 interpreter by default and avoid having those annoying virtual environments poping up in my home folder every time I need to write a script?
Change the Python interpreter in the project settingsPress Ctrl+Alt+S to open the IDE settings and select Project <project name> | Python Interpreter. Expand the list of the available interpreters and click the Show All link. Select the target interpreter.
You can clean out old PyCharm interpreters that are no longer associated with a project via Settings -> Project Interpreter, click on the gear in the top right, then click "More". This gives you a listing where you can get rid of old virtualenvs that PyCharm thinks are still around.
In the Run/Debug Configurations window click the Configuration tab. On the right side of the Python interpreter field is a dropdown triangle that when clicked brings up a context menu that allows you to change the Python interpreter.
Pycharm does not activate virtualenv automatically in powershell.
This is a bit convoluted. When clicking File > New Project
you get a pop-up window where you set the project name, under the name there is a little text saying Project Interpreter: Python 3.6
. Click on it and some options expand. The preset option is New Virtual Environment
with the default system interpreter. The other, not set option, is Existing Interpreter
which is the one you set in the Default Settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With