制作whl
1.创建用于存放wheel文件目录
mkdir wheels
2.安装wheel库
pip install wheel
3.进入wheels目录
cd wheels
4.使用pip wheel 从官网下载whl文件
pip wheel -r /opt/guardianenv/requirement.txt
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
制作pip源
1. 安装pip2pi包
pip install pip2pi
2.创建存放源目录
mkdir /opt/pythonpip
3. 下面要制作的源码包
单个包:
pip2tgz /opt/pythonpip/ pymongo==3.3.0
批量包:
pip2tgz /opt/pythonpip/ -r requirements.txt
4. 建立索引
dir2pi /opt/pythonpip
5. 把索引目录软链接到http服务节点以提供访问
ln -s /opt/pythonpip /var/www/html/pythonpip
6. 添加pip.conf 文件,修改默认访问pip源地址
/root/.pip/pip.conf
[global]
timeout = 6000
index-url = http://192.168.3.110/pythonpip/simple
[install]
use-mirrors = true
mirrors = http://192.168.3.110/pythonpip/simple
trusted-host = 192.168.3.110
7
7
1
[global]
2
timeout = 6000
3
index-url = http://192.168.3.110/pythonpip/simple
4
[install]
5
use-mirrors = true
6
mirrors = http://192.168.3.110/pythonpip/simple
7
trusted-host = 192.168.3.110