Search code examples
pythonpippypi

Trying to use pip to install my Python package that I uploaded to PyPI, getting "No matching distribution found for"


I'm new to python, trying to figure out how to create a simple package, upload to PyPI, then download using PIP.

Source: https://github.com/shane-kercheval/kerlib

I tried: python setup.py register

Seemed to work, result:

running register
running egg_info
writing top-level names to kerlib.egg-info/top_level.txt
writing requirements to kerlib.egg-info/requires.txt
writing kerlib.egg-info/PKG-INFO
writing dependency_links to kerlib.egg-info/dependency_links.txt
reading manifest file 'kerlib.egg-info/SOURCES.txt'
writing manifest file 'kerlib.egg-info/SOURCES.txt'
running check
Registering kerlib to https://pypi.python.org/pypi
Server response (200): OK

So, to test it out, I created a temp directory, created a virtual environment (virtualenv -p python3 venv_kerlibtest), activated the virtual environment (source venv_kerlibtest/bin/activate), and then tried to download via pip (pip install kerlib)

and got

Could not find a version that satisfies the requirement kerlib (from versions: )
No matching distribution found for kerlib

I also got the same thing when I tried packages that clearly didn't exist, like pip install asdfasdfasdfldsf.

Thoughts?


Solution

  • Just running python setup.py register isn't enough; that just creates an entry for your project on PyPI. You also need to run python setup.py sdist bdist_egg upload to upload your code (from sdist) and a binary distribution (from bdist_egg) to the repository. This needs to be done every time you need to release a new version.