I am using ubuntu and I have created a python package and it is ready to register on PyPI but when I use python setup.py register
it is showing an error like this:
Server response (410): This API is no longer supported, instead simply upload the file.
I know that this is the error of not finding the .pypirc file but I don't know how to fix this because my home does not have the .pypirc file.Can't we just create the pypirc file?(just asking). Also there is a different error when I use the register command in the virtualenv, I get this:
Server response (410): Gone (This API has been deprecated and removed from legacy PyPI in favor of using the APIs available in the new PyPI.org implementation of PyPI (located at https://pypi.org/). For more information about migrating your use of this API to PyPI.org, please see https://packaging.python.org/guides/migrating-to-pypi-org/#uploading. For more information about the sunsetting of this API, please see https://mail.python.org/pipermail/distutils-sig/2017-June/030766.html)
and here is my setup.py file
from setuptools import setup
setup(name='Utilitarian',
version='0.1',
description='little description',
url='https://github.com/Shivams334/Utilitarian.git',
author='Shivam Sharma',
author_email='[email protected]',
license='MIT',
packages=['Utilitarian'],
zip_safe=False)
Please help. Thank you.
You need to create
.pypirc
file by yourself in yourHOME
directorythis file should contain the following code, put you login and password from pypi
Because you put you login and password into this file, you may want to change it's permission so that only you can read and write it.
And after it you can try to register your package, by the way I hightly recommend you using twine library to load your package, just install it
Then make a distribution for your package
This command will create a
dist
folder with your module packed inside then register your project (if necessary):after it you can upload your package to pip with the following command