- E: Unable to locate package python-pip on Kali Linux
- 3 Answers 3
- You must log in to answer this question.
- Linked
- Related
- Hot Network Questions
- Subscribe to RSS
- Unable to locate package python3-distutils in Ubuntu 16.04
- 3 Answers 3
- How to fix the error “unable to locate package python-pip”
- Resolve the problem “Unable to locate package python-pip”
- Reason: Python-pip is Not Found
- Solution 1: Check Python Version and Use Correct Syntax
- Solution 2: Use the Universe Repository
- Conclusion
- [Solved] Unable to locate package python-pip
- How Unable to locate package python-pip Error Occurs ?
- How To Solve Unable to locate package python-pip Error ?
- Solution 1: Use this command
- Solution 2: Identify version that installed in your System
- Solution 3: Using curl
- Solution 4: Reinstall in Windows
- Summary
E: Unable to locate package python-pip on Kali Linux
I’m trying to install the package python-pip on Kali Linux, but when I try, with sudo apt-install python-pip ) it tells me «E: Unable to locate package python-pip». I’m not sure what to do; I’ve tried every common solution but nothing seems to work.
3 Answers 3
Please execute the commands below:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py sudo python get-pip.py
The python-pip package is only available for kali-last-snapshot branch (stable). To install it through apt (with the exact name python-pip ) you need to switch branch to kali-last-snapshot , see this answer.
On kali-rolling you need to install python3-pip package.
People running Kali Linux need to give command sudo apt install python3-pip it will fulfill all the dependencies.
You must log in to answer this question.
Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.
Linked
Related
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.26.43546
Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group.
This site is not affiliated with Linus Torvalds or The Open Group in any way.
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
Unable to locate package python3-distutils in Ubuntu 16.04
I am an Ubuntu noob and would like to ask you guys to help. Currently I’m faced with 2 issues. 1st issue is when I’m trying mkvirtualenv —python=/usr/bin/python3.8 ENV , it threw me this error.
Error: RuntimeError: failed to query /usr/bin/python3.8 with code 1 err: 'Traceback (most recent call last):\n File "/home/yao1122/.local/lib/python2.7/site- packages/virtualenv/discovery/py_info.py", line 16, in \n from distutils.command.install import SCHEME_KEYS\nModuleNotFoundError: No module named \'distutils.command\'\n'
After googling from net, I decide to try install this. sudo apt-get install python3-distutils . Then it threw me this error.
Error: Unable to locate package python3-distutils
I am using ubuntu 16.04. Does anyone know what is the root cause? Much appreciate your precious time for helping me out and THANK YOU in advance!
3 Answers 3
Ultimately I got it working on 16.04 using a solution I found in this thread.
Try to run the following in the terminal:
sudo apt-get install python-distutils-extra
Per the user who provided this answer, it would seem that python3-distutils ends up installed as a dependency of distutils-extra, though why this method works where other methods failed for me isn’t clear.
python3-distutils and python3.8 are in the default Ubuntu 18.04 repositories, so you wouldn’t get these errors in Ubuntu 18.04.
In Ubuntu 16.04 open the terminal and type:
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt install python3.6 cd ~/Desktop/ wget -c http://launchpadlibrarian.net/449402985/python3-lib2to3_3.6.9-1~18.04_all.deb wget -c http://launchpadlibrarian.net/449402975/python3-distutils_3.6.9-1~18.04_all.deb sudo apt install ./python3-lib2to3_3.6.9-1~18.04_all.deb sudo apt install ./python3-distutils_3.6.9-1~18.04_all.deb
You might need to run update-alternatives —config python3 after the first three commands to temporarily set python3.6 as the default Python 3.X version in order to install python3-lib2to3. Changing the default Python 3 version will break a lot of applications if you don’t immediately change it back to the 16.04 system default Python 3 version after you finish installing python3-lib2to3 and python3-distutils and before you close the terminal. These two packages are also compatible with Python3.8, so after you finish installing them you won’t need python3.6 and the ppa:deadsnakes/ppa anymore.
If you updated with a new python (from 3.5 to 3.6), then your /usr/bin/python3 points to the new python that does not have apt_pkg. Edit /usr/bin/add-apt-repository . Change the first line of /usr/bin/add-apt-repository from #! /usr/bin/python3.6 back to #! /usr/bin/python3
How to fix the error “unable to locate package python-pip”
One of the countless features that Linux provides is the ability to install any software using just the terminal on the system. Regardless not every software is present in the apt repository to be installed. The python-pip tool is utilized to install a wider variety of packages related to python. The python-pip tool itself needs to be installed from the apt repository first. During this installation process, the “Unable to locate package python-pip” error can be invoked by the system.
This article will provide all the necessary information about this error including its reasons and how to resolve this problem.
Resolve the problem “Unable to locate package python-pip”
This error is encountered when trying to install the python-pip package. There are different reasons surrounding this installation that can cause the error. This section will deal with all the possible reasons for the error and their corresponding solutions.
Reason: Python-pip is Not Found
The most simple explanation for why this error is invoked is that the apt installer can not locate the package python-pip. There are a few different solutions that will help the terminal to locate the correct package as well as resolve the error.
Solution 1: Check Python Version and Use Correct Syntax
The most suitable way to resolve the issue is to use a slightly different command to install the pip tool. To know the correct syntax, the system’s Python version needs to be checked. To know which version of Python the system is running, try the following commands:
$ python2 --version $ python3 --version
The command corresponding to the Python version will execute and display the version as shown in the image below:
Once the Python version is known, use the corresponding syntax to install the pip tool. The sample commands are given below.
If the system is running Python version 2 use this command:
$ sudo apt install python2-pip
If the system is running Python version 3 use this command:
$ sudo apt install python3-pip
This change in the syntax should successfully remove the “Unable to locate package python-pip” issue from the system and python-pip will be installed.
Solution 2: Use the Universe Repository
The python-pip package can be found inside the Universe repository. This is another repository that contains a lot of different software which are free to download. All these software are also opensource that are If your system is not equipped with the Universe repository then you can add it using the following commands:
$ sudo apt-get install software-properties-common $ sudo apt-add-repository universe $ sudo apt-get update
Once the Universe repository is added successfully as shown in the snippet above, the python-pip command can easily be executed as follows:
$ sudo apt install python-pip
By following this, the “Unable to locate package python-pip” error will be resolved and the python-pip package can be installed easily.
Conclusion
The “Unable to locate package python-pip” error occurs when the apt installer is unable to locate a package inside its repository. To fix this, there are two methods. One is to use the correct syntax corresponding with the python version installed on your system. The other method is to add the Universe repository to your system. This contains the python-pip package. Here, you have learned about the reason and the possible solutions to the error “unable to locate package python-pip”.
TUTORIALS ON LINUX, PROGRAMMING & TECHNOLOGY
[Solved] Unable to locate package python-pip
Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to install python-pip with sudo apt install python-pip this command. But I am facing following error Unable to locate package python-pip in Python. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
How Unable to locate package python-pip Error Occurs ?
I am trying to install python-pip with sudo apt install python-pip this command. But I am facing following error.
$ pip
Command ‘pip’ not found, but can be installed with:
sudo apt install python-pip
$ sudo apt install python-pip
[sudo] password for aiki:
Reading package lists…
Done Building dependency tree Reading state information… Done
C: Unable to locate package python-pip
How To Solve Unable to locate package python-pip Error ?
How To Solve Unable to locate package python-pip Error ?
To Solve Unable to locate package python-pip Error Just follow these command step by step: sudo apt-get install software-properties-common Then run this command: sudo apt-add-repository universe Now, sudo apt-get update Then sudo apt-get install python-pip Second solution is You just need to Identify version that installed in your System Use this command to find your installed version: ls /bin/python* If Python 2.X Installed then run This command: sudo apt-get install python2-pip If Python 3.X Installed then run This command: sudo apt-get install python3-pip Now your error should be solved.
Unable to locate package python-pip
To Solve Unable to locate package python-pip Error Just follow these command step by step: sudo apt-get install software-properties-common Then run this command: sudo apt-add-repository universe Now, sudo apt-get update Then sudo apt-get install python-pip Second solution is You just need to Identify version that installed in your System Use this command to find your installed version: ls /bin/python* If Python 2.X Installed then run This command: sudo apt-get install python2-pip If Python 3.X Installed then run This command: sudo apt-get install python3-pip Now your error should be solved.
Solution 1: Use this command
Just follow these command step by step.
sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get install python-pip
Now your error should be solved.
Solution 2: Identify version that installed in your System
You just need to Identify version that installed in your System Use this command to find your installed version.
If Python 2.X Installed then run This command.
sudo apt-get install python2-pip
If Python 3.X Installed then run This command.
sudo apt-get install python3-pip
Now your error should be solved.
Solution 3: Using curl
Download pip with curl. Just run this command. If you do not have curl installed then First of all install curl or skip this command.
https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Hope, Your problem might be solved now.
Solution 4: Reinstall in Windows
- First of all Launch a command prompt if it isn’t already open. To do so, open the Windows search bar, type cmd and click on the icon.
- Then, run the following command to download the get-pip.py file:
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- Then type this command:
- python get-pip.py
- Once you’ve installed PIP, you can test whether the installation has been successful by typing the following.
- pip help.
- Now, your error must be solved.
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?