Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set a Default Interpreter and use NO virtualenv in PyCharm 2017

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?

like image 963
Jonatan Öström Avatar asked Dec 12 '17 17:12

Jonatan Öström


People also ask

How do I change the default interpreter in Python PyCharm?

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.

How do I remove VENV from PyCharm?

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.

How do I change Virtualenv interpreter?

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.

Does PyCharm automatically activate VENV?

Pycharm does not activate virtualenv automatically in powershell.


1 Answers

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.

like image 176
Jonatan Öström Avatar answered Sep 23 '22 05:09

Jonatan Öström