I need help. I newone in Linux OS and in Python at all.
I need to install python interpreter v. 3.6 for my current project. The reason is – lib, that i would like to use doesn’t work on 3.7+
I use Pycharm and want to set new environment with interpreter 3.6. I know that i can set it in settings/project/python interpreter. But i can see only python v2,v2.7,v3,v3.9.
How can i add 3.6 version? Please, help)
command apt install python3.6 doen’t help me.
└─# apt install python3.6 2 ⨯
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python3.6
E: Couldn't find any package by glob 'python3.6'
About OS:
└─# cat /etc/os-release 127 ⨯
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2021.1"
VERSION_ID="2021.1"
VERSION_CODENAME="kali-rolling"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"
Serge Ballesta helped me. Thanks a lot!
Just for silly ubuntu users like me – "how to install some source distribution"
Extract the .tar.gz or (.tar.bz2) file with the following commands
tar xvzf PACKAGENAME.tar.gz
Navigate to the extracted folder using cd command
cd PACKAGENAME
Now run the following command to install the tarball
./configure
sudo make install
4
Answers
Not all Unix distributions offer all Python versions. It is common to only have one Python 2.7.x version and one or two Python 3.y .
Normally Python 3 has a good ascending compatibility, so a Python 3.9 should run a Python 3.6 without any problem. If you really need a specific version, the desperate way is to get a source distribution from python.org and build it locally. The downside is that this one will not participate in
apt
version control, so it will not be detected by third party application. But it is the only way I know to have a no longer distribution maintained version.You can write
and then run
First remove older version
Remove unwanted libraries of old version
install new version
latest version of python is successfully installed!
check version
see details: https://pkg.kali.org/pkg/python3.6
as seen, python3.6 removed than the Kali repository.
please, download the python3.6 using following url
https://www.python.org/downloads/release/python-360/