Questions tagged [twine]

For questions about the Python package used for uploading distributions to the Python Package Index (PyPI).

Use the tag if your question is about any of the features found in the Twine package.

This can include, but is not limited to:

  • interacting with PyPI
  • uploading to PyPI

Twine is a utility for securely interacting with PyPI over HTTPS. PyPI is the Python Package Index - a repository of software for the Python programming language.

Twine is one of two ways to upload to PyPI, the other being through the "setup.py upload" command.

When tagging with consider tagging with as well.

145 questions
71
votes
8 answers

How to upload new versions of project to PyPI with twine?

I've uploaded my Python package to PyPI. But now I made new version of my package and need to upload it. I tried to make same progress which I did when upload the package first time but I got the error below: HTTPError: 400 Client Error: File…
Basel Akasha
  • 1,108
  • 1
  • 11
  • 25
27
votes
14 answers

Can't upload to PyPi with Twine

I'm trying to upload a python package to PyPi, using the following commands: pip install -e . python setup.py bdist_wheel --universal twine upload --repository-url https://upload.pypi.org/legacy/ dist/* I get this error: HTTPError: 403 Client…
Ed Harrod
  • 3,423
  • 4
  • 32
  • 53
25
votes
3 answers

Twine is asking for my password each time : how to use the .pypirc

I have pip installed pypirc and set up a ~/.pypirc file with the requisite password. Why is twine asking for a password each time python setup.py is invoked? $twine upload --repository-url https://test.pypi.org/legacy/ dist/* Enter your…
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560
19
votes
1 answer

Binary wheel can't be uploaded on pypi using twine

I am trying to upload a package on Pypi for linux and windows from github actions with linux I get this result Binary wheel 'xxx-cp36-cp36m-linux_x86_64.whl' has an unsupported platform tag 'linux_x86_64'. during windows installation…
user2426998
  • 483
  • 5
  • 20
19
votes
2 answers

Twine upload TypeError: expected string or bytes-like object

Has anybody got an error like this when you try to upload your package ? $ twine upload dist/* Uploading distributions to https://upload.pypi.org/legacy/ Enter your username: MyUsername Enter your password: ******** TypeError:…
Bruno Lopes
  • 199
  • 2
  • 7
17
votes
3 answers

twine not found (-bash: twine: command not found)

I am trying to use twine to publish my first python package on pypi (of course will add on test-pypi first). I followed the official guideline on https://packaging.python.org/tutorials/packaging-projects/. But for some reason, twine is not found…
peterpark828
  • 177
  • 1
  • 1
  • 9
11
votes
7 answers

Upload to pypi from Gitlab Pipelines

I'm trying to upload a package to pypi using a Gitlab CI job, but I cannot make it work :/ Anyone has a working example? What I have tried so far in my .gitlab-ci.yaml (from my local machine all of them are working): Twine with a .pypirc file -…
jgsogo
  • 706
  • 1
  • 9
  • 18
11
votes
1 answer

what does `twine upload dist/*` command do?

I apologize in advance since this seems like a basic question... I am trying to learn using mujoco(link here), and inside its python binding Makefile it has: upload: rm -rf dist python setup.py sdist twine upload dist/* What does twin…
MoneyBall
  • 2,343
  • 5
  • 26
  • 59
11
votes
1 answer

python SSL certificate validation fails on some distribution commands

I'm trying to upload a Python file to PyPi via twine upload but I get an SSL error: C:\pypubsub>twine upload dist\PyPubSub-4.0.0rc1-py3-none-any.whl Uploading distributions to https://upload.pypi.org/legacy/ Uploading…
Oliver
  • 27,510
  • 9
  • 72
  • 103
9
votes
2 answers

Twine is defaulting "long_description_content_type" to text/x-rst

Heres is my setup setup( name="`...", version="...", description=..., long_description_content_type="text/markdown", long_description=README, author="...", classifiers=[...], packages=["..."], …
ElLoko 233
  • 473
  • 1
  • 5
  • 11
8
votes
1 answer

Twine hangs without prompting for password

I'm attempting to upload a tarball and wheel for a new package to PyPI using twine which was recently installed under a conda environment (Miniconda3). After I enter my username I expect to be prompted for my password, but this never happens and…
James Adams
  • 8,448
  • 21
  • 89
  • 148
8
votes
3 answers

Why is Twine 1.9.1 still uploading to legacy PyPi?

I want to upload packages to pypi.org as mentioned in the Migrating to PyPI.org documentation, but Twine uploads to https://upload.pypi.org/legacy/. It's available on pypi.python.org/pypi/mypolr, but is not found on pypi.org. I've tried to read…
Thomas Fauskanger
  • 2,536
  • 1
  • 27
  • 42
7
votes
2 answers

How to correctly create Python feature branch releases in development? (pip and PEP-440)

I develop a Python library using Gitflow development principle and have a CI stage for unit testing and package upload to a (private) PyPI. I want to consume the uploaded package for testing purposes before I merge it back to the integration…
sh0rtcircuit
  • 445
  • 3
  • 13
7
votes
1 answer

How to fix 'Could not find a version that satisfies the requirement' for install_requires list when pip installing in custom package?

I am trying to build my own Python package (installable by pip) using the twine package. This is all going well right up until the point where I try to pip install my actual package (so after uploading to PyPi). So I first run: python3 setup.py…
Josh
  • 404
  • 1
  • 5
  • 15
7
votes
2 answers

My RST README is not formatted correctly on PyPi

I uploaded a package to pypi.org but my RST README isn't formatted correctly. This is what it looks like on GitHub: https://github.com/NinjaSnail1080/akinator.py This is what it looks like on PyPi: https://pypi.org/project/akinator.py/ For some…
user9727906
1
2 3
9 10