Failed to upload packages to PyPI: 410 Gone

Upgrade to the very latest pip and setuptools; install twine: pip install -U pip setuptools twine Edit ~/.pypirc and comment out or remove repository: [pypi] #repository:https://pypi.python.org/pypi Use twine to upload your module to pypi from within the folder containing the module source, setup.py, and other files: python setup.py sdist twine upload dist/* See https://packaging.python.org/guides/migrating-to-pypi-org/#uploading

How do I add images to a PyPI readme (that works on GitHub)?

PyPI will not read your package distributions for the image. You have to use the image’s external link, for example: .. image:: https://raw.githubusercontent.com/greyli/flask-share/master/images/demo.png If you are using Markdown description, use this: ![](https://raw.githubusercontent.com/greyli/flask-share/master/images/demo.png) Be sure to replace the URL in the above examples with your image URL, here I use the image hosted by GitHub, the … Read more

Update a PyPI package

When you encountered a bug, always upload a new release. Increase the version number, include a changelog, call it a brown-bag release (it wasn’t me, it was someone wearing a brown bag over their heads, really, honestly). You never know whom already may have downloaded a copy of the release (on a mirror, directly from … Read more

How to overwrite pypi package when doing upload from command line?

A late answer, but: it seems everybody agrees you can’t overwrite existing pypi uploads, or re-upload a fixed version after you delete a broken version. However, it seems actually possible and officially supported: “build numbers” are a feature that nobody has ever used or remembers they exist, but that seems to work, at least for … Read more

Check if requirements are up to date

Pip has this functionality built-in. Assuming that you’re inside your virtualenv type: $ pip list –outdated psycopg2 (Current: 2.5.1 Latest: 2.5.2) requests (Current: 2.2.0 Latest: 2.2.1) $ pip install -U psycopg2 requests After that new versions of psycopg2 and requests will be downloaded and installed. Then: $ pip freeze > requirements.txt And you are done. … Read more

Check if requirements are up to date

Pip has this functionality built-in. Assuming that you’re inside your virtualenv type: $ pip list –outdated psycopg2 (Current: 2.5.1 Latest: 2.5.2) requests (Current: 2.2.0 Latest: 2.2.1) $ pip install -U psycopg2 requests After that new versions of psycopg2 and requests will be downloaded and installed. Then: $ pip freeze > requirements.txt And you are done. … Read more

PyPI is slow. How do I run my own server?

Do you have a shared filesystem? Because I would use pip’s cache setting. It’s pretty simple. Make a folder called pip-cache in /mnt for example. mkdir /mnt/pip-cache Then each developer would put the following line into their pip config (unix = $HOME/.pip/pip.conf, win = %HOME%\pip\pip.ini) [global] download-cache = /mnt/pip-cache It still checks PyPi, looks for … Read more