0.本身已经安装python3.6
1.从外网下载解压pypiserver-master.zip进入文件夹pypiserver-master执行python setup.py install提示缺少wheel从外网下载解压缩wheel-0.33.6.tar.gz进入文件夹:wheel-0.33.6执行python setup.py install2.再次进入文件夹pypiserver-master执行python setup.py install提示缺少从外网下载解压缩setuptools-git-1.2.tar.gz进入文件夹:setuptools-git-1.2执行python setup.py install3.再次进入文件夹pypiserver-master执行python setup.py install 报错,提示需要目录创建文件夹G:\pypiserver 执行pip install -d G:\pypiserver pypiserver成功4.创建文件夹G:\pypiserver 启动pypiserverpypi-server G:\pypiserver #默认8080可以主动指定端口pypi-server -p9090 G:\pypiserver访问 http://localhost:8080/ 如果显示"Welcome to pypiserver!This is a PyPI compatible package index serving 0 packages.To use this server with pip, run the the following command:pip install --extra-index-url http://localhost:8080/ PACKAGE [PACKAGE2...]To use this server with easy_install, run the the following command:easy_install -i http://localhost:8080/simple/ PACKAGEThe complete list of all packages can be found here or via the simple index.This instance is running version 1.3.0 of the pypiserver software."就是正常的将自己编译好(python setup.py sdist)的包ccy-1.0.tar.gz放入目录 G:\pypiserver 卷 G 的文件夹 PATH 列表卷序列号为 9C1E-658DG:.├─c11│ ├─c111│ │ └─__pycache__│ └─__pycache__├─c12└─__pycache__开始安装pip install --extra-index-url http://localhost:8080/ ccypip install --extra-index-url http://localhost:8080/ ccy==1.0 #最好制定版本卸载安装的包pip uninstall ccy--- 为了方便卸载,安装的时候需要写入日志python setup.py install --record logcat log|xagrs rm -rf 也可以用easy_install安装easy_install -i http://localhost:8080/simple/ ccy在我的环境中用这种不带版本的安装方式,python需要在引用包的时候添加如下语句import pkg_resourcespkg_resources.require("ccy==1.0")easy_install -i http://localhost:8080/simple/ ccy==1.0卸载安装的包easy_install -m ccy测试脚本:#TestMyPkg.py#import pkg_resources#pkg_resources.require("ccy==1.0")import c11.f11c11.f11.my11.showmyself()