How to Install Python3 on Kali Linux in 2025

How to Install Python3 on Kali Linux in 2025

After writing about Ct-Exposer and CMSeeK some comments appearing in our comment box. Some people of us have problem to installing Python3 in their Kali Linux System. They need to upgrade Kali Linux 2020 versions because in newer versions of Kali Linux Python3 comes pre-installed, or if need manual installation then follow our guide.

Install Python3 in Kali Linux
Install Python3 in Kali Linux

We don’t need to install Python3 in recent updated and full-upgraded Kali Linux. Because Kali Linux 2019.1 is comes with Python 3.6 pre-installed. But if we have older version of Kali Then.
 Installing Python3 is very easy. We need to go to the Download section of official Python website. 

https://www.python.org/downloads/
Download Section of https://www.python.org/

Now we click on Download Python 3.x.x (As of this writing, the latest is Python 3.7.4) and download the tar.xz compressed file. After finishing the download we open the Terminal window is our Kali Linux system.
We will run a command to check the updates

apt-get update

After updating (if available) we need to go to the Downloads section by using following command:

cd Downloads

Then we type following command:

tar -xvf Python-3.x.x.tar.xz

Here 3.x.x. is representing our downloaded recent version of Python
The screenshot is following:

python3.tar.xz decompressing

Now we got a decompressed folder of Pyhton3.x.x (whenever we wright Python3.x.x the x.x will represents the downloaded version of Python3 for us that is Python 3.7.4).
Now we go to the folder Python3.x.x by applying following command :

cd Python3.x.x

Then we need to configure the Python3 before install. So we configure it by using following command:

./configure

The screenshot is following:

./configure python3

Then we need to run make to compile the Python source before install.

make

It will take a little time. The screenshot is following:

python3 make

Then we can install Python3.x.x by using following command:

make install

python3 kali linux make install

This will take time. So sit back and share our this post to friends.

When this process will complete we will check the version of python3 by using following command:

python3 -V

The following screenshot shows that we have Python version 3.7.4.

pyhton 3.7.4 in Kali Linux

When we need to use Python 2 we just type python in Kali Linux terminal and when we need Python 3 we type python3 in our Kali Linux system.

Python 3.6 is pre-installed in newer Kali Linux system. But by default pip3 is not there to install pip3 run following command :

apt-get install python3-pip

KP AKA Koushik Pal is a Security researcher and specialist focused on educating about Linux for cybersecurity and URL‑masking vulnerabilities. Creator of MaskPhish, a well‑known open‑source bash-based URL‑masking tool. Linux enthusiasts Active speaker, trainer, and advocate for secure web practices.

35 comments

comments user
Unknown

there is showing "please use python 3 to install wifiphisher". i installed python 3 latest version. but again is showing.

comments user
Kali Linux

Thanks for your valuable comment . Can you tell us what command you have used? Try following commands:
git clone https://github.com/wifiphisher/wifiphisher.git
cd wifiphisher
sudo python3 setup.py install

comments user
Unknown

Writes modulenotfounderror: no module named 'setuptools'

What to do?

comments user
Kali Linux

Install setuptools and try again.

try command:

sudo apt-get install -y python-setuptools

comments user
Unknown0001

Traceback (most recent call last):
File "setup.py", line 23, in
from setuptools import Command, find_packages, setup
ModuleNotFoundError: No module named 'setuptools'

comments user
Unknown0001

I already try this command "git clone https://github.com/wifiphisher/wifiphisher.git
cd wifiphisher
sudo python3 setup.py install"

But still i encouter error "December 29, 2019 at 10:14 PM

Traceback (most recent call last):
File "setup.py", line 23, in
from setuptools import Command, find_packages, setup
ModuleNotFoundError: No module named 'setuptools'"

comments user
Kali Linux

Thanks for your valuable comment. Check this link out

https://stackoverflow.com/questions/14426491/python-3-importerror-no-module-named-setuptools

comments user
Unknown

Muchas gracias por haberse tomado su tiempo para compartir sus conocimientos!

comments user
Kali Linux

De nada. Gracias por la respuesta.

comments user
Maxwel

E: Package 'python-setuptools' has no installation candidate
This is the error i am getting

comments user
Kali Linux

Hi Maxwel, use following commands to solve this error
sudo apt-get update

sudo apt-get upgrade

sudo apt-get install python-setuptools

Let us know if this works.

comments user
Ryo

xxx@kali:~/app $ sudo apt-get install python-setuptools
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package python-setuptools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-setuptools' has no installation candidate

comments user
Kali Linux

Try following commands one by one:
sudo apt-get update

sudo apt-get upgrade

sudo apt-get install python-setuptools

comments user
Yes d Tech (shailesh)

E: Package 'python3-pip' has no installation candidate
what i do after am install python3

comments user
Kali Linux

Try following commands one after another:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
python3 get-pip.py

It should install pip3 you can check the version by using:
pip3 -V

comments user
Anonymous

it tried it but i am not able to install help me . https:dirtypic.xyz

comments user
Kali Linux

Which version of Kali Linux you are using?

comments user
Unknown

i wrote ,,apt-get install python3-pip" and i got information : ,, SyntaxError: invalid syntax" what can i do?

comments user
rahul

rahul@kali:~/Downloads/Python-3.8.5$ make install
if test "no-framework" = "no-framework" ; then
/usr/bin/install -c python /usr/local/bin/python3.8;
else
/usr/bin/install -c -s Mac/pythonw /usr/local/bin/python3.8;
fi
/usr/bin/install: cannot create regular file '/usr/local/bin/python3.8': Permission denied
make: *** [Makefile:1235: altbininstall] Error 1

After make install i am facing this problem

comments user
Kali Linux

You should try following command:
sudo make install

comments user
Unknown

zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [Makefile1186: install] Error 1

After make install. is there a solution?

comments user
Anonymous

(I am using python 3.8.5)

comments user
Kali Linux

You are already in Python3. The problem is zlib is missing from your system. You can install it by applying following command:
sudo apt-get install zlib1g-dev

comments user
Unknown

please when i install python3-pip then show this error
ackage python3-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3-pip' has no installation candidate

comments user
Kali Linux

Try following commands one by one
sudo apt-get update
sudo apt-get upgrade
sudo apt install python3-pip

comments user
Anonymous

i install python3 but in version it shown python 2.7

comments user
Kali Linux

Try the following command:

python3 –version

And show us the output in comment section.

comments user
Anonymous

it show 3.8.5

comments user
Kali Linux

It shows that you sucessfully installed Python3. Are you trying python command before script. To use Python3 you always need to use Python3 command, Like

Python3 myscript.py

Hope this will help you.

comments user
Anonymous

Pls pls also give a tutorial to install pip and requests

comments user
Kali Linux

This is very easy to install pip use following command:

sudo apt install python3-pip

To install requests module use following command:

sudo pip3 install requests

comments user
Unknown

sir can we use pycharm for python scripts for kali linux i need an answer sir thanks

comments user
Kali Linux

Yes. We can use Pycharm IDE on Kali Linux. We will create a tutorial on it very soon. Thanks.

comments user
Anonymous

Python3 can't open the storm-Breaker and seeker files

Post Comment