All Questions
702
questions
876
votes
10
answers
1.2m
views
Can I force pip to reinstall the current version?
I've come across situations where a current version of a package seems not to be working and requires reinstallation. But pip install -U won't touch a package that is already up-to-date. I see how to ...
699
votes
23
answers
2.0m
views
How to install pip with Python 3?
I want to install pip. It should support Python 3, but it requires setuptools, which is available only for Python 2.
How can I install pip with Python 3?
407
votes
32
answers
1.2m
views
"pip install unroll": "python setup.py egg_info" failed with error code 1
I'm trying to install some packages with pip.
But pip install unroll gives me
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\MARKAN~1\AppData\Local\Temp\pip-build-...
321
votes
10
answers
301k
views
Does uninstalling a package with "pip" also remove the dependent packages?
When you use pip to install a package, all the required packages will also be installed with it (dependencies). Does uninstalling that package also remove the dependent packages?
265
votes
17
answers
297k
views
Upgrade python packages from requirements.txt using pip command
How do I upgrade all my python packages from requirements.txt file using pip command?
tried with below command
$ pip install --upgrade -r requirements.txt
Since, the python packages are suffixed ...
138
votes
5
answers
59k
views
Why #egg=foo when pip-installing from git repo
When I do a "pip install -e ..." to install from a git repo, I have to specify #egg=somename or pip complains. For example:
pip install -e git://github.com/hiidef/oauth2app.git#egg=oauth2app
What's ...
117
votes
6
answers
52k
views
pip install . creates only the dist-info not the package
I am trying to make a python package which I want to install using pip install . locally. The package name is listed in pip freeze but import <package> results in an error No module named <...
92
votes
12
answers
375k
views
Python: How to pip install opencv2 with specific version 2.4.9?
I know that I could pip install opencv-python which installs opencv3, but is there a separate command or name for opencv specific version such as 2.4.9?
If not, how can I specify which version to ...
84
votes
4
answers
26k
views
Check if requirements are up to date
I'm using pip requirements files for keeping my dependency list.
I also try to follow best practices for managing dependencies and provide precise package versions inside the requirements file. For ...
62
votes
9
answers
40k
views
How to install python package with a different name using PIP
When installing a new python package with PIP, can I change the package name because there is another package with the same name?
Or, how can I change the existing package's name?
51
votes
7
answers
61k
views
See when packages were installed / updated using pip
I know how to see installed Python packages using pip, just use pip freeze. But is there any way to see the date and time when package is installed or updated with pip?
49
votes
5
answers
15k
views
How can I see all packages that depend on a certain package with PIP?
I would like to see a list of packages that depend on a certain package with PIP. That is, given django, I would like to see django-cms, django-filer, because I have these packages installed and they ...
46
votes
2
answers
20k
views
Using hyphen/dash in python repository name and package name
I am trying to make my git repository pip-installable. In preparation for that I am restructuring the repo to follow the right conventions. My understanding from looking at other repositories is that ...
41
votes
7
answers
89k
views
Pip Install hangs
I currently have Python 3.5 on my Windows machine. I'm trying to install a Python package using the command "pip install" but as soon as I hit enter nothing happens. The action hangs for ...
37
votes
1
answer
19k
views
what does pip install actually do?
Super newb question here..
What does pip install actually do?
Assuming the pypi package is a tarball...
Does it just download the tar.gz, unpack it and run setup.py?
Does it add the downloaded package ...
34
votes
3
answers
105k
views
cannot import name 'MutableMapping' from 'collections' [duplicate]
I'm getting the following error:
File "/home/ron/rzg2l_bsp_v1.3/poky/bitbake/lib/bb/compat.py", line 7, in <module>
from collections import MutableMapping, KeysView, ValuesView, ...
32
votes
4
answers
74k
views
pip fails to install packages from requirements.txt
I am trying to install a python software using the requirements file.
>> cat requirements.txt
Cython==0.15.1
numpy==1.6.1
distribute==0.6.24
logilab-astng==0.23.1logilab-common==0.57.1
netaddr==...
29
votes
4
answers
37k
views
How do I access packages installed by `pip --user`?
I realized I had an outdated numpy version:
$ python
Python 2.7.10 (default, Oct 23 2015, 18:05:06)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "...
23
votes
4
answers
94k
views
Pip: could not find a version. No matching distribution found
I'm trying to install Flask-ACL:
https://mikeboers.github.io/Flask-ACL
$ pip search acl | grep -i flask
Flask-ACL (0.0.1) - Access control lists for Flask.
flask-miracle-acl (0.2) - The fabric ...
22
votes
1
answer
15k
views
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. when trying to install dotenv
I'm trying to install dotenv for my discord bot with pip3 install dotenv but it keeps giving me this error:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import ...
22
votes
6
answers
100k
views
Can't run pip on python 3.11
I'm on a fresh Ubuntu 20.4 install (or really, a reinstall, as I messed up some things and had to start over; everything except /home has been reformatted, so if there is an issue with remnants, it's ...
22
votes
5
answers
99k
views
(Python: discord.py) ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly
trying to download discord.py using pip install, gave me the error message in the title.
I installed using cmd and the commands py -m pip install -U discord, the cmd was also run in admin.
tried using ...
20
votes
3
answers
38k
views
pip won't install Python packages locally with --user
I'm trying to install packages locally with pip. It used to work with --user but now when I try it, it finds the version of the package in /usr/local/lib/ and then does not install it locally. ...
20
votes
2
answers
11k
views
pip Install Editable Package Produces ModuleNotFoundError
Due to import issues, I've followed the steps shown here to install my Python project as an editable pip package. Basically this entails running pip install -e . from my project root directory. The ...
17
votes
1
answer
26k
views
What option do I need in setup.py to create the package in the right directory?
I am using setup.py to create a python package, which I want to install via pip. To correctly install the files under
lib/python2.7/site-packages/<package-name>
I used the following option in ...
17
votes
1
answer
3k
views
How can I list the extra features of a Python package
Some Python packages have extra features that can be installed by putting them into brackets such as the security extra for the requests package:
pip install requests[security]
Is there a way to list ...
15
votes
2
answers
17k
views
Locate source code from pip install packages in Ubuntu
I have installed some packages with pip in Ubuntu. However, I want to change some part of the installed code from those packages. In windows is easy to do so, from Pycharm using provided links. How ...
15
votes
8
answers
186k
views
Python 3.9 pip install
I recently downloaded and installed Python 3.9 because I wanted to run a website scraper to more easily organize recipes found online. However, when I try to run pip it says it doesn't recognize it (...
15
votes
2
answers
4k
views
Python packages installation in Windows
I recently began learning Python, and I am a bit confused about how packages are distributed and installed.
I understand that the official way of installing packages is distutils: you download the ...
14
votes
2
answers
11k
views
pip install tensorflow cannot find file called client_load_reporting_filter.h
I keep failing to run pip install on the tensorflow package. First it downloads the .whl file, then goes through a bunch of already satisfied requirements until it gets to installing collected ...
14
votes
6
answers
19k
views
Get date and time of installation for packages installed via pip
I would like to find a way to get the calendar date and time in hour:minute:seconds format for my packages installed via pip.
I would like to be able to see something in output like:
Month/Day/Year - ...
14
votes
3
answers
14k
views
All dependencies are not downloaded with "pip download"
I'm trying to setup a local directory with packages that can be reused for installation on a machine without an internet connection but I'm having problems with some of the packages.
I first download ...
14
votes
1
answer
17k
views
upgrade all outdated pip packages discarding failures [duplicate]
I have a bash command to upgrade all pip packages that I installed.
The command is:
pip3 list --outdated | cut -d' ' -f1 | tail -n +3 | xargs pip3 install --upgrade
The problem is that if one of ...
14
votes
2
answers
11k
views
How to use from x import y using importlib in Python
I wanted to install and import a package from script. Then I wanted to add from x import y and from x import * in that script.(I was making some functions actually).
I successfully installed and ...
13
votes
3
answers
4k
views
Pip regular expression search
I need to find all packages on PyPI that match a particular regular expression:
^django-.*?admin.*$
Basically, the package name should start with django- and have admin word after. For example, the ...
13
votes
1
answer
4k
views
Python pip - install documentation for packages?
Is there a way to install/generate the documentation for the packages installed using pip?
I wish to install all the required packages for a project, as well as all the associated documentation (e.g. ...
13
votes
4
answers
22k
views
ERROR Backend subproccess exited when trying to invoke get_requires_for_build_sdist
I used the Upload Python Package workflow on GitHub to upload the module stored in the repository to PyPI.
As you can see at the link above, I followed the tutorial given by packaging.python.org, to ...
12
votes
2
answers
6k
views
Access a Python Package from local git repository
I have a local git repository on my machine, let's say under /develop/myPackage.
I'm currently developing it as a python package (a Django app) and I would like to access it from my local virtualenv. ...
12
votes
3
answers
42k
views
ImportError: No module named pip when trying to install packages
Have a fresh install of Ubuntu 13.10 with PyCharm and when setting up the python interpreter I selected 'install setuptools', then 'install pip'. Now if I try and do anything with pip I get the ...
12
votes
2
answers
6k
views
Difference between pip3 and `python3 setup.py install` regarding cmdclass argument
I tried to configure my package such that a script is executed on the installation process. Therefore, I inherited from setuptools.command install and created my custom class ActionOnInstall to do ...
11
votes
1
answer
28k
views
installing packages with pip returns error [duplicate]
a while ago i downloaded pip from https://pip.pypa.io/en/stable/installing/
before i realised my version of python allready comes with pip. i succesfully used it to download pygame but now i am trying ...
11
votes
2
answers
9k
views
Do I need to commit the dist folder to git in order to be able to install the package using pip from git?
I want to reuse some code for my internal team at work. My plan is to create a package and then have people install the package using pip straight out of our git repo. i.e. as shown here: https://pip....
11
votes
2
answers
46k
views
Install library for jupyter notebook
I start my jupyter notebook with python2 as:
jupyter notebook nameofnotebook
Then I want to import library like this:
import scipy
But I have an error telling that there is no such library.
So I ...
10
votes
2
answers
38k
views
I can't install json module [closed]
Whenever I try to install a package I get this error:
ERROR: Could not find a version that satisfies the requirement json (from versions: none)
ERROR: No matching distribution found for json
9
votes
2
answers
6k
views
Get the requirements of a package in PyPI without installing it? [duplicate]
I need something like the following:
pip showrequirements tensorflow
This would return something that allows me to parse the names of the required packages and the required versions:
astor>0.6, ...
9
votes
1
answer
5k
views
PIP3 list failed completely and returing error
After I run "pip3 install rsa==3.4.2". I cannot use "pip3 list" command any more and pretty much any pip command will fail.
The error is like the following
Exception:
Traceback (most recent call ...
9
votes
3
answers
17k
views
How to install a package rdkit from Conda with pip?
I am trying to install rdkit using pip3. But it doesn't work.
sudo pip3 install rdkit
Error: Could not find a version that satisfies the requirement rdkit (from versions: )
No matching distribution ...
9
votes
6
answers
24k
views
ImportError: cannot import name 'Serial' from 'serial' (unknown location)
Whenever i execute the code below it gives me following Error:
ImportError: cannot import name 'Serial' from 'serial' (unknown location)
Code:
from serial import Serial
arduinodata = Serial('...
8
votes
3
answers
35k
views
Package (Python PIL/Pillow) installed but I can't import it
I want to do some image processing and I encountered a problem. Importing the pillow module doesn't seem to work. I found a simple script here to check what packages are installed and I found it, but ...
8
votes
3
answers
11k
views
When I do pip --version it show the error as ImportError: No module named pyparsing
I tried installing/uninstalling pyparsing as well and it does not work. I am stuck with this and I have to install additional libraries as well.
Here is the error message:
Traceback (most recent ...