I installed Ubuntu 20.04 on a PC. I then tried to get started and install pip for python3. However nothing seemed to work.
This is what I have tried so far:
sudo apt install python3-pip
This is the error I get:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 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
I have tried the solution proposed by Carlos Sanchez JR.:
How to install Python package installer PIP on Ubuntu 20.04 Linux
After following the advice given in the link above I got this error when doing sudo apt update
:
Ign:1 cdrom://Ubuntu 20.04 LTS _Focal Fossa_ - Release amd64 (20200423) focal InRelease
Hit:2 cdrom://Ubuntu 20.04 LTS _Focal Fossa_ - Release amd64 (20200423) focal Release
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal InRelease
Get:5 http://kali.download/kali kali-rolling InRelease [30.5 kB]
Hit:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Err:5 http://kali.download/kali kali-rolling InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
Get:8 http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease [30.5 kB]
Err:8 http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
Reading package lists... Done
W: GPG error: http://kali.download/kali kali-rolling InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
E: The repository 'http://http.kali.org/kali kali-rolling InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
E: The repository 'http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Trying sudo apt install python3-pip
at this point just gives me the same E: Package 'python3-pip' has no installation candidate
error as before. This is equally true when trying
sudo apt-get install python3-pip
.
I have found no other solutions to this problem.
sudo apt install python3-pip
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Некоторые пакеты невозможно установить. Возможно, вы просите невозможного,
или же используете нестабильную версию дистрибутива, где запрошенные вами
пакеты ещё не созданы или были удалены из Incoming.
Следующая информация, возможно, поможет вам:
Пакеты, имеющие неудовлетворённые зависимости:
python3-pip : Зависит: python-pip-whl (= 8.1.1-2) но 8.1.1-2ubuntu0.4 будет установлен
Рекомендует: python3-dev (>= 3.2) но он не будет установлен
Рекомендует: python3-wheel но он не будет установлен
E: Невозможно исправить ошибки, у вас отложены (held) битые пакеты.
-
Вопрос заданболее трёх лет назад
-
2810 просмотров
Поставить через easy_install3:
sudo apt install python3-setuptools
sudo easy_install3 pip
Пригласить эксперта
Рекомендует: python3-dev (>= 3.2) но он не будет установлен
Рекомендует: python3-wheel но он не будет установлен
неудовлетворенные зависимости?
-
Показать ещё
Загружается…
09 июн. 2023, в 01:21
10000 руб./за проект
09 июн. 2023, в 01:06
50000 руб./за проект
09 июн. 2023, в 00:36
1000 руб./за проект
Минуточку внимания
sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pip
how to install python-pip in ubuntu:14.04?
Boyka
8192 gold badges9 silver badges16 bronze badges
asked Sep 11, 2015 at 7:01
2
python-pip
is in the universe repositories, therefore use the steps below:
sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install python-pip
answered Sep 11, 2015 at 8:19
A.B.A.B.
88.5k21 gold badges245 silver badges321 bronze badges
20
I ran into this problem trying to install pip for python2; e.i. I wanted pip2. What worked for me was this:
sudo apt-get update && sudo apt-get install python-pip
Hope this helps someone.
anonymous2
4,2586 gold badges32 silver badges61 bronze badges
answered Apr 5, 2017 at 19:00
RobbotnikRobbotnik
3112 silver badges3 bronze badges
1
ubuntu@ip-172-31-18-233:my_folder$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
I installed pip using:
sudo apt install python-pip
The python version:
python --version
Python 3.6.9
But, when I try to install any package, I am getting this error.
sudo pip install yamlpath
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
sudo pip3 install yamlpath
sudo: pip3: command not found
python -m pip install yamlpath
/usr/bin/python: No module named pip
asked May 25, 2021 at 17:21
#Below version is for python 2 only
sudo apt remove python-pip -y
#Python3 version of pip
sudo apt install -y python3-pip
#Setting as default version
sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
answered May 27, 2021 at 11:51
udayuday
3328 silver badges30 bronze badges
You might take a look at this stackoverflow question.
In short, you’ve got two pips that aren’t playing nicely together. If you uninstall one, you might be able to manage with the other. There are too many viable solutions in the answers to justify writing them out here. Maybe just sudo apt-get remove pip3
and trying to find your existing pip. Personally, I’d cycle through these:
pip --version
pip3 --version
python3 -m pip --version
python3 -m pip3 --version
For example, I have 20.0.2 for pip3 --version
and python3 -m pip --version
This should help you find your version once the conflicting install is removed.
answered May 25, 2021 at 17:52
3
To resolve these issues, I recommend trying the following steps:
Upgrade pip:
python -m ensurepip --upgrade
Try installing yamlpath using python -m pip:
python -m pip install yamlpath
If you still encounter errors, please provide more information about your system and the exact error message you receive, so I can help you better.
answered Feb 13 at 13:52
In the Python environment, users need to upgrade or install new packages from the pip (a package manager for Python) command. While using pip or accessing pip, you might face an error “usr bin python no module named pip”.
This article will provide insight into the multiple reasons and their solutions to the above-mentioned error.
- Reason: Not Install Pip Module in System
- Solution 1: Install Python3 Framework
- Solution: 2 Install Pip3 Package Manager
Reason: Not Install Pip Module in System
During the installation of the package from Python3, some modules are not properly integrated into the Linux system. The main reason for the “usr bin python no module named pip” error is that the “pip” module is not being installed in the current system:
Solution 1: Install Python3
To resolve this error, you just install the latest version of python in the operating system. For instance, execute the below script for installing Python3 via terminal:
$ sudo apt install python3
It requires permission to continue the installation process; hit “Y” from the keyboard to complete the installation:
For RHEL/CentOS Linux Distributions
To install python3 in “RHEL, CentOS” Linux distributions, follow the below script:
$ sudo yum install python3-pip
For Fedora
$ sudo dnf install python3-pip
Check Python Version
The installed python version can be checked in the operating system. For instance, the “–version” utility is used to present the current version of python:
The output shows that the “Python 3.10.6” version has been installed in the current system.
Solution 2: Install pip Package Manager
Pip3 is the package manager for Python3. It installs the packages which are not in the Python Library. The installation of Pip3 resolves the above error, and you can install any package from a third-party software package. To install the pip3 package manager, run the below-mentioned command:
$ sudo apt install python3-pip
Check Package Manager Version
You can verify the installed package manager with the help of the “— version” utility. For instance, the script id given below that displays the currently installed version:
Usage of pip Command
The possible commands of pip with all descriptions can be visualized by executing the below script:
(Optional) Install a Package From pip3
It is an additional step to install any package by utilizing the package manager. For this, specify the package’s name below:
That is all from this guide.
Conclusion
The error “usr bin python no module named pip” comes across when the python environment is not installed in the operating system. To resolve this error, execute the “<sudo apt install python3>” command to enable the system to execute Python code. Additionally, the “<sudo apt install python3-pip>” command resolves the error by enabling the users to install any package from “pip3” package managers.