The Computer Oracle

Can't install virtual interpreter in PyCharm in Linux

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Horror Game Menu Looping

--

Chapters
00:00 Can'T Install Virtual Interpreter In Pycharm In Linux
00:29 Accepted Answer Score 97
00:55 Answer 2 Score 7
01:21 Answer 3 Score 2
01:55 Answer 4 Score 0
02:26 Answer 5 Score 0
03:37 Thank you

--

Full question
https://superuser.com/questions/1319047/...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#ubuntu #python #pycharm #virtualenv

#avk47



ACCEPTED ANSWER

Score 97


I had to install it. This was fresh Kubuntu 18.04 install, obviously, without this needed package.

sudo apt-get install python3-distutils

After that I restarted PyCharm and creating virtual project interpreter was successful.




ANSWER 2

Score 7


If @Hrvoje T's answer did not work (it did not work for me) then try this:

Run this command and you should be able to install the packaging tools in Pycharm:

sudo apt install python3-pip

It's python3-pip, not python-pip if you are using the Python3 interpreter.

https://stackoverflow.com/questions/43567996/pycharm-python-packaging-tools-not-found




ANSWER 3

Score 2


Neither @Hrvoje T and @hyukkyulee worked for me since I had already installed those packages. Uninstalling and reinstalling didn't solve the issue as well.

I just upgraded my system to Ubuntu 19.10 and I noticed that they had upgrade the python interpreter to 3.7. PyCharm however was generating the venv interpreter based to its previous one (python 3.6). By changing the base interpreter from New Interpreter block I solved this issue.




ANSWER 4

Score 0


Actually, @hyukkyulee solution solved the issue.

It is because, by default, Ubuntu comes with python 2.7 and python 3.x version. And if you have installed pip using

sudo apt install python-pip

will install 'pip' in python 2.7 folder.

so you need to specify python3-pip to install pip in python 3 folder along with other util packages.




ANSWER 5

Score 0


Had the same issue with an installation of: PyCharm 2019.3.2 (Edu) Build #PE-193.6494.27, built on February 5, 2020 Runtime version: 11.0.5+10-b520.38 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 5.3.0-7629-generic

Installed on Pop!_OS 19.10 with Python 3.7.2 installed. I did use Jetbrains Toolbox to install pycharm edu. Jetbrains Toolbox was installed using a script suggested by jetbrain's pycharm download page.

Running: sudo apt install python3-pip

solved the problem instantly, didn't even have to restart pycharm, just created a new project and no issue setting up the virtual environment.

I did install python-pip after updating to python 3.7.2 before having pychram installed. So same as running python3.7 in a terminal without changing the alias the 3 after python matters.