Questions tagged [pip]

Use for questions about the Python package installer but not about Picture-in-Picture

pip is the package installer for Python. You can use pip to install packages from the Python Package Index and other indexes. The name is a recursive acronym for "Pip Installs Packages".

It replaces easy_install and is an improved Python package installer. The differences between easy_install and pip can be found in a discussion on the Python Packaging User Guide.

Please do not use the tag for Picture-in-Picture, use instead.

23287 questions
568
votes
38 answers

No module named pkg_resources

I'm deploying a Django app to a dev server and am hitting this error when I run pip install -r requirements.txt: Traceback (most recent call last): File "/var/www/mydir/virtualenvs/dev/bin/pip", line 5, in from pkg_resources import…
igniteflow
  • 8,404
  • 10
  • 38
  • 46
555
votes
42 answers

'pip' is not recognized as an internal or external command

I'm running into a weird error when trying to install Django on my computer. This is the sequence that I typed into my command line: C:\Python34> python get-pip.py Requirement already up-to-date: pip in c:\python34\lib\site-packages Cleaning…
user3597950
  • 9,201
  • 6
  • 26
  • 35
544
votes
17 answers

Is it possible to use pip to install a package from a private GitHub repository?

I am trying to install a Python package from a private GitHub repository. For a public repository, I can issue the following command which works fine: pip install git+git://github.com/django/django.git However, if I try this for a private…
Adam J. Forster
  • 17,789
  • 9
  • 25
  • 20
515
votes
14 answers

Installing Python packages from local file system folder to virtualenv with pip

Is it possible to install packages using pip from the local filesystem? I have run python setup.py sdist for my package, which has created the appropriate tar.gz file. This file is stored on my system at…
chadgh
  • 9,063
  • 8
  • 38
  • 54
505
votes
32 answers

Error after upgrading pip: cannot import name 'main'

Whenever I am trying to install any package using pip, I am getting this import error: guru@guru-notebook:~$ pip3 install numpy Traceback (most recent call last): File "/usr/bin/pip3", line 9, in from pip import main ImportError:…
g_p
  • 5,499
  • 3
  • 19
  • 22
492
votes
38 answers

setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

When I try to install odoo-server, I got the following error: error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 Could anyone help me to solve this issue?
Madura Dissanayake
  • 8,309
  • 5
  • 25
  • 34
490
votes
13 answers

How can I Install a Python module within code?

I need to install a package from PyPI straight within my script. Is there maybe some module or distutils (distribute, pip, etc.) feature which allows me to just execute something like pypi.install('requests') and requests will be installed into my…
chuwy
  • 6,310
  • 4
  • 20
  • 29
469
votes
43 answers

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available

I am using Python 3.6. When I try to install "modules" using pip3, I face this issue: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available
Santosh Kumar G
  • 4,801
  • 2
  • 11
  • 9
462
votes
12 answers

How do I install the yaml package for Python?

I have a Python program that uses YAML. I attempted to install it on a new server using pip install yaml and it returns the following: $ sudo pip install yaml Downloading/unpacking yaml Could not find any downloads that satisfy the requirement…
harperville
  • 6,921
  • 8
  • 28
  • 36
446
votes
28 answers

Error "filename.whl is not a supported wheel on this platform"

I would like to install scipy-0.15.1-cp33-none-win_amd64.whl that I have saved to the local drive. I am using: pip 6.0.8 from C:\Python27\Lib\site-packages python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] When I run: pip…
lskrinjar
  • 5,483
  • 7
  • 29
  • 54
440
votes
18 answers

How to install python3 version of package via pip on Ubuntu?

I have both python2.7 and python3.2 installed in Ubuntu 12.04. The symbolic link python links to python2.7. When I type: sudo pip install package-name It will default install python2 version of package-name. Some package supports both python2 and…
kev
  • 155,172
  • 47
  • 273
  • 272
438
votes
19 answers

Reference requirements.txt for the install_requires kwarg in setuptools setup.py file

I have a requirements.txt file that I'm using with Travis-CI. It seems silly to duplicate the requirements in both requirements.txt and setup.py, so I was hoping to pass a file handle to the install_requires kwarg in setuptools.setup. Is this…
Louis Thibault
  • 20,240
  • 25
  • 83
  • 152
432
votes
21 answers

Using Pip to install packages to Anaconda Environment

conda 4.2.13 MacOSX 10.12.1 I am trying to install packages from pip to a fresh environment (virtual) created using anaconda. In the Anaconda docs it says this is perfectly fine. It is done the same way as for virtualenv. Activate the…
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
426
votes
19 answers

Find all packages installed with easy_install/pip?

Is there a way to find all Python PyPI packages that were installed with easy_install or pip? I mean, excluding everything that was/is installed with the distributions tools (in this case apt-get on Debian).
Jürgen A. Erhard
  • 4,908
  • 2
  • 23
  • 25
405
votes
4 answers

How to pip install a package with min and max version range?

I'm wondering if there's any way to tell pip, specifically in a requirements file, to install a package with both a minimum version (pip install package>=0.2) and a maximum version which should never be installed (theoretical api: pip install…
coredumperror
  • 8,471
  • 6
  • 33
  • 42