Reputation: 1538
I made a pip package and uploaded it here:
https://pypi.org/project/audacityDiscogsExporter/0.1.0/
If i run pip install audacityDiscogsExporter==0.1.0
or pip install audacityDiscogsExporter
I get an error saying :
martin@MSI:/mnt/c/Users/marti/Documents/projects/package$ pip install audacityDiscogsExporter
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement audacityDiscogsExporter (from versions: none)
ERROR: No matching distribution found for audacityDiscogsExporter
Why can't I install this package?
Upvotes: 0
Views: 5416
Reputation: 22295
It looks like you are trying to use a Python 2 interpreter to install a Python-3-only project.
When using pip
(or actually any other Python script directly), it is important to make sure which Python interpreter is used. Usually it is obvious which Python interpreter is used when calling pip
, but it also often happens that it is not clear. It is better to call the exact Python interpreter explicitly always. Typically:
$ python -m pip install Something
$ # instead of 'pip install Something'
$ python3 -m pip install Something
$ # instead of 'pip3 install Something'
If there is still doubt, one could even go one step further and use the full path to the Python interpreter explicitly:
$ /usr/bin/python3.8 -m pip install Something
$ /path/to/myvenv/bin/python3 -m pip install Something
An interesting read on the topic: Brett Cannon's article "Why you should use python -m pip
"
Upvotes: 5