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:

645 questions
192
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,020
  • 2
  • 6
  • 4
162
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,721
  • 2
  • 8
  • 8
129
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…
Vineet Kaushik
  • 2,154
  • 7
  • 25
  • 35
125
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,351
  • 2
  • 8
  • 4
98
votes
10 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,379
  • 2
  • 12
  • 15
84
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
  • 20,414
  • 30
  • 103
  • 166
62
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…
whatwhatwhat
  • 783
  • 1
  • 6
  • 9
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
  • 1
  • 5
  • 9
54
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…
Rohan Naik
  • 541
  • 1
  • 4
  • 4
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
  • 1
  • 8
  • 17
47
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
  • 581
  • 1
  • 6
  • 15
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,615
  • 16
  • 76
  • 108
37
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,151
  • 7
  • 32
  • 60
27
votes
3 answers

Is there a good PPA for cmake backports?

I am looking for a reliable PPA for cmake backports. I need it for both Xenial and Trusty (travis-ci). Ideally I would like to have at least cmake 3.8.
Juan Leni
  • 2,108
  • 5
  • 21
  • 32
26
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
  • 361
  • 1
  • 3
  • 4
1
2 3
42 43