我的工具:Windows 7,Python 3.4.2
我正在阅读Paul Barry 2010年11月出版的Head First Python的第二章。
部分要求是将我的发行版上传到PyPI测试站点。
遗憾的是我没有成功。
到目前为止,我所做的所有阅读都表明,我需要在Windows中使用这个HOME环境变量,或者将.pypirc放在Windows 7的主目录中。
在Windows 7中没有这样的环境变量,也没有这样的目录。
..........有人可以给我一步一步的指导使用命令行工具在Windows 7?
到目前为止,我已经在这个目录C:Python34nesterhead中创建了一个.pypirc.txt文件,我的模块位于Windows 7中。
然后使用命令行工具将。txt文件从。pypirc.txt重命名为。pypirc。,即
cd C: Python34 nesterhead
REN .pypirc.txt .pypirc.
c:python34python.exe setup.py register -r pypitest
..........我得到了这个作为输出。
ValueError: pypitest not found in .pypirc
..........我已经完成了所有我应该做的事情,包括确认我的注册并检查https://testpypi.python.org/pypi
..........我还遵循了http://peterdowns.com/posts/first-time-with-pypi.html的说明,并在我的.pypirc.txt
中使用了以下具有正确用户名和密码的代码 [distutils]
index-servers =
pypi
pypitest
[pypi]
repository: https://pypi.python.org/pypi
username: {{your_username}}
password: {{your_password}}
[pypitest]
repository: https://testpypi.python.org/pypi
username: {{your_username}}
password: {{your_password}}
echo %userprofile%
这将显示你在windows 7中的主目录