1、项目下新建setup.py 文件 2、setup.py文件目录下执行,生成xxxx压缩包 python setup.py sdist 3、安装xxxx压缩包 pip install xxxx.tar.gz 4、检查是否安装成功 pip list