我想我的包上傳到PyPI將用此錯誤想出了:的PyPI Asse田:不支持的架構
Traceback (most recent call last):
File "setup.py", line 11, in <module>
author_email= #my email,
File "C:\Programming\Python\Anaconda\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Programming\Python\Anaconda\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Programming\Python\Anaconda\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Programming\Python\Anaconda\lib\distutils\command\upload.py", line 63, in run
self.upload_file(command, pyversion, filename)
File "C:\Programming\Python\Anaconda\lib\distutils\command\upload.py", line 73, in upload_file
raise AssertionError("unsupported schema " + schema)
由於python setup.py register -r pypitest
不再需要上傳的包,我運行此命令:python setup.py sdist upload -r pypitest
,並輸入我的密碼後,錯誤進入pypitest
這是我的setup.py
和.pypirc
文件的外觀。
setup.py
from setuptools import setup
setup(
name='instapi',
packages=['instapi'],
version='0.1',
description='Clean and simple Instagram API for Python 3.x',
url='https://github.com/SemptraStar/instapi',
download_url = 'https://github.com/SemptraStar/instapi/archive/v._0.1.tar.gz',
author= #me,
author_email= #also me,
)
.pypirc
[distutils]
index-servers =
pypi
pypitest
[pypi]
repository=https://pypi.python.org/pypi
username= # username
password= # password
[pypitest]
repository=https://testpypi.python.org/pypi
username= # username
password= # password
更新1
我改變了存儲庫的URL來https://upload.pypi.org/legacy/
對的PyPI和https://test.pypi.org/legacy/
爲pypitest。還更新了最新版本的setuptools(36.3.0)。沒有改變。
我試過了,但結果保持不變。 –
它似乎在抱怨你的網址,所以我會專注於此。出於某種原因,它認爲你輸入了一個無效的URL(特別是它不是'http'或者'https')。試着直接複製和粘貼我的URL,最後用斜槓。還要確保setuptools和所有東西完全是最新的。 –