Reputation: 53
I made a library called Pillow3f. I tried to upload it to Pypi. Here are the step I took to do so and the error I received when trying to install it. I am using Python3.6, and I already checked the latest dist folder to make sure it said python36.
I started with this:
python setup.py bdist
then, it gave me Pillow3f.egg-info, dist, and build. I then ran this command
twine upload dist/*
I did not receive an error during those 2 processes. Next, I went on to try and download it.
pip install Pillow3f
And received this error:
Could not find a version that satisfies the requirement pillow3f (from versions: 0.0.1.win-amd64, 0.1.0.win-amd64, 0.1.1.win-amd64, 1.0.win-amd64)
No matching distribution found for pillow3f
It checks out, I did upload many files with those different versions each tying to troubleshoot what was happening. I went to the PyPi help page to no avail. Does anyone know what's wrong? I am using windows and don't mind providing extra information in the comments.
It also may be worth mentioning that when I tried this:
pip install https://files.pythonhosted.org/packages/74/cb/100cdf7d1cc4a599be6d2bbe3aebec348e2
8b7d307d2bf50c08149cea86d/Pillow3f-1.0.win-amd64.zip
I got this error
C:\Users\*********>pip install https://files.pythonhosted.org/packages/74/cb/100cdf7d1cc4a599be6d2bbe3aebec348e28b7d307d2bf50c08149cea86d/Pillow3f-1.0.win-amd64.zip
Collecting https://files.pythonhosted.org/packages/74/cb/100cdf7d1cc4a599be6d2bbe3aebec348e28b7d307d2bf50c08149cea86d/Pillow3f-1.0.win-amd64.zip
Using cached https://files.pythonhosted.org/packages/74/cb/100cdf7d1cc4a599be6d2bbe3aebec348e28b7d307d2bf50c08149cea86d/Pillow3f-1.0.win-amd64.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\**********\appdata\local\programs\python\python36\lib\tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\**********\\AppData\\Local\\Temp\\pip-req-build-rwbj64rl\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\**********\AppData\Local\Temp\pip-req-build-rwbj64rl\
Upvotes: 4
Views: 10355
Reputation: 57470
python setup.py bdist
creates a "dumb" installer package, which is an obsolete format that pip does not support. The correct, supported package formats to build & upload are sdist (python setup.py sdist
) and wheel (python setup.py bdist_wheel
).
Upvotes: 0
Reputation: 21520
This happens when none of the built distributions (bdists) are compatible with the platform or architecture you're trying to install the package in. Is it possible you're installing the package in a non-windows environment?
Unless your project depends on C extensions or other platform-specific code, the easiest solution would be to publish a source distribution as well:
$ python setup.py sdist
$ twine upload dist/Pillow3f-1.0.tar.gz
A source distribution will be usable by any platform, and provides a fallback in the event that no built distributions are available.
Upvotes: 2