Cannot use Python 3.10 as interpreter on Pycharm

Viewed 2242

I have python3.10 installed but I cannot set it as an interpreter.

The installation can be confirmed by calling python3.10 directly on the terminal, and with the command below:

$ ls -ls /usr/bin/python*
   0 lrwxrwxrwx 1 root root       9 Apr 16  2018 /usr/bin/python -> python2.7
   0 lrwxrwxrwx 1 root root       9 Apr 16  2018 /usr/bin/python2 -> python2.7
3548 -rwxr-xr-x 1 root root 3633000 Feb 27  2021 /usr/bin/python2.7
   0 lrwxrwxrwx 1 root root       9 Nov 17 05:41 /usr/bin/python3 -> python3.6
5312 -rwxr-xr-x 1 root root 5437464 Oct  5 07:05 /usr/bin/python3.10
4424 -rwxr-xr-x 1 root root 4526456 Jan 26  2021 /usr/bin/python3.6
4424 -rwxr-xr-x 1 root root 4526456 Jan 26  2021 /usr/bin/python3.6m
   0 lrwxrwxrwx 1 root root      10 Nov 17 05:41 /usr/bin/python3m -> python3.6m

However, when trying to configure python3.10 as the venv on Pycharm using the path above, I get Failed to create virtual environment. I think it has something to do with the arrows in the terminal print out above, so if anyone could help explain and configure it properly, it would be really helpful.

1 Answers

Need to install the venv lib for each version of python.

In this case,

sudo apt-get install python3.10-venv

Related