“setup.py upload” is failing with “Upload failed (401): You must be identified to edit package information”

后端 未结 7 1537
悲&欢浪女
悲&欢浪女 2020-12-23 19:57

When running..

python setup.py sdist register upload

..I get the following output:

running register
We need to know who you         


        
7条回答
  •  一向
    一向 (楼主)
    2020-12-23 20:15

    I have the same problem, This is my solution.

    The python version is 2.7.7, my windows version is Windows-7-6.1.7601-SP1.

    here is my .pypirc file

    [distutils]
    index-servers=pypi
    
    [pypi]
    repository = https://pypi.python.org/pypi
    
    [server-login]
    username = user
    password = password
    

    Notice:

    In windows, A file is not allowed named as “.pypirc”,plz,refer to:

    Rename files to empty filename in Windows

    Then put you ".pypirc" file in the same folder with "setup.py"

    At last:

    run :

    python setup.py sdist upload
    

    or:

    python setup.py sdist register upload
    

    I hope this will be help,thank you!

提交回复
热议问题