I'm trying to package a new project and upload it to the TestPyPI server. Because of the introduction of the new PyPI.org, virtually all the instructions I've found are out of date, and trying to upload to https://testpypi.python.org/pypi now returns 401 Gone
.
The guide for migrating to the new PyPI.org says to use https://test.pypi.org/legacy
as the repository for TestPyPI. However, when inserting this URL into my .pypirc
file and trying to upload my package, I receive the following error:
python setup.py sdist upload -r testpypi
[...]
running upload
Submitting dist/<package_name> to https://test.pypi.org/legacy
Upload failed (404): Not Found
error: Upload failed (404): Not Found
Here are the contents of my ~/.pypirc
file:
[distutils]
index-servers =
pypi
testpypi
[pypi]
repository: https://pypi.python.org/pypi
username: your_username
password: your_password
[testpypi]
repository: https://test.pypi.org/legacy
username: pbaranay
password: my_password
Upload your package to the Test PyPI repositoryLogin to the Test PyPI repository and verify that your package is in there. If so, copy the command that is under the package's name, run it in your command line and, read in your screen the message saying that your package was successfully installed.
Go to https://test.pypi.org/account/register/ to register your account. The database for TestPyPI may be periodically pruned, so it is not unusual for user accounts to be deleted.
The new URL for the Test PyPI repository is https://test.pypi.org/legacy/ -- note the trailing slash. The migration guide also says to use this URL (with the slash included).
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