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 Error: Invalid or non-existent authentication information. for url: https://upload.pypi.org/legacy/
I've also tried the following commands:
twine upload dist/*
twine upload --repository-url pypi dist/*
twine upload --repository-url https://upload.pypi.org/legacy dist/*
python setup.py bdist_wheel --universal upload
with a .pypirc file located in the same directory I'm running the commands from which is:
[distutils]
index-servers =
pypi
pypitest
[pypitest]
repository: https://testpypi.python.org/pypi/
username: <username>
password: <password>
[pypi]
repository: https://upload.pypi.org/legacy/
username: <username>
password: <password>
But I'm still asked for my password. (Also tried this using pypitest, after creating an account on there too, but get the same error)
I've also tried doing the same but with the repository line removed.
The package name I'm trying to upload used to be occupied, but it has been removed now - https://pypi.python.org/pypi?name=&version=1.0.0&:action=display says that the package is not found
The username and password I'm using are the same I use to successfully log in to https://pypi.python.org/pypi?%3Aaction=login_form
Go to PyPI and create an account. Run twine upload dist/* in the terminal/command line. Enter the account credentials you registered for on the actual PyPI. Then, run pip install [package_name] to install your package.
What's a "yanked" release? A yanked release is a release that is always ignored by an installer, unless it is the only release that matches a version specifier (using either == or === ). See PEP 592 for more information.
EDIT: if you're using Windows, check my other suggestion
It looks like some sort of error with the account I was using. The following steps fixed it for me:
twine upload dist/*
Also be aware that the test pypi server --repository-url https://test.pypi.org/legacy/
, requires a different account to be created from the live server --repository-url https://upload.pypi.org/legacy/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With