Questions tagged [pip]

Questions regarding the use of pip, a package installer for Python.

pip is a package installer for Python, which allows one to easily install various Python packages, such as from PyPI. pip works in addition to the package manager which is already installed on the system for all other kinds of packages.

Installation and uninstallation are commonly handled by the following commands, respectively:

  • pip install package-name
  • pip install package-name

For more information, see the following links:

662 questions
219
votes
19 answers

ModuleNotFoundError: No module named 'distutils.util'

After updating to Ubuntu 20.04, whenever I run: pip install or pip --version it says: adam@daryy:~$ pip3 Traceback (most recent call last): File "/usr/local/bin/pip3", line 5, in from pip._internal.cli.main import…
Rock Life
  • 2,290
163
votes
8 answers

Pip is not working: ImportError: No module named 'pip._internal'

Running pip or pip3 results with: Traceback (most recent call last): File "/home/myuser/.local/bin/pip", line 7, in from pip._internal import main ImportError: No module named 'pip._internal' I had issues with this, and uninstalled pip3,…
Keweik
  • 1,731
136
votes
4 answers

apt-get install vs pip install

I am a bit confused about the cases in which the above commands must be used when downloading python packages. I was trying to download a package named pyudev in accordance with an answer with this question. I executed this command : sudo pip…
126
votes
3 answers

installing pip3 (for python3) on ubuntu 16.04 LTS using a proxy

I have tried entering: sudo apt install python3-pip The error I get is: $ sudo apt install python3-pip Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be…
Abisdad
  • 1,361
102
votes
9 answers

How can I upgrade pip to the latest version?

I installed pip using get-pip.py, but the following error happened after pip freeze gets executed: Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main …
Raja Simon
  • 1,429
85
votes
7 answers

How do I detect and remove Python packages installed via pip?

I have accidently installed Python packages to my system using pip instead of apt-get. I did this in two ways: using an older version of virtualenv, I forgot to append --no-site-packages when creating the virtualenv - after that when I called pip…
lofidevops
  • 21,912
64
votes
6 answers

Is `sudo pip install` still a broken practice?

I'm new to Ubuntu, so please bear with me. I installed pip using this command: sudo apt-get -y install python-pip. Then I installed NLTK using the command on their website, which was: sudo pip install -U nltk. But then I stumbled on this question…
56
votes
9 answers

When using sudo to run pip "pip: command not found" but it's installed

sudo easy_install pip Searching for pip Best match: pip 1.4.1 Processing pip-1.4.1-py2.7.egg pip 1.4.1 is already the active version in easy-install.pth Installing pip script to /home/nyzlfc/.local/bin Installing pip-2.7 script to…
55
votes
3 answers

"fatal error: openssl/opensslv.h: No such file or directory" compiling mitmproxy

I'm trying to install the mitmproxy package via pip like this: $ sudo pip install mitmproxy It terminates with following error message: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing…
Niklas
  • 711
51
votes
2 answers

How to install pip for Python 3.6 on Ubuntu 16.10?

I'd like to start by pointing out that this question may seem like a duplicate, but it isn't. All the questions I saw here on Ask Ubuntu were regarding pip for Python 3 and I'm talking about Python 3.6. The steps used back then don't work for Python…
JChris
  • 993
48
votes
2 answers

sudo apt-get install python-pip is failing

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?
R_SS
  • 591
48
votes
6 answers

pip error on Ubuntu: externally-managed-environment × This environment is externally managed

I upgraded to Ubuntu 23.04. Now, when I run a pip command (installed using sudo apt install python3-pip), I get this error: $ pip install --user error: externally-managed-environment × This environment is externally managed ╰─> To install…
Flimm
  • 44,031
46
votes
3 answers

Error installing scrapy in virtualenv using pip

pip install scrapy Downloading/unpacking scrapy Downloading Scrapy-0.24.2-py2-none-any.whl (502kB): 502kB downloaded Downloading/unpacking pyOpenSSL (from scrapy) Downloading pyOpenSSL-0.14.tar.gz (128kB): 128kB downloaded Running setup.py…
Lynob
  • 6,775
43
votes
4 answers

How to install pydot and graphviz?

Im running a code that needs pydot and graphviz. I am using python 3.5 and ubuntu 16.04 LTS 64 bit. File "/usr/local/lib/python3.5/dist-packages/keras/utils/vis_utils.py", line 17, in _check_pydot raise ImportError('Failed to import pydot.…
Kong
  • 1,329
28
votes
8 answers

Unable to uninstall programs using sudo pip

I looked this up online but they're all suggesting using sudo command I used sudo pip uninstall numpy I get this message: Not uninstalling numpy at /usr/lib/python2.7/dist-packages, outside environment /usr I installed it using pip , not apt…
momo12321
  • 381
1
2 3
44 45