长风1959

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

 

 

 

 

 

 

安装pip2pi

# tar zxf pip2pi-0.8.2.tar.gz
# cd pip2pi-0.8.2/
# python setup.py build
# python setup.py install

修改默认pip源为国内腾讯pip源

# pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple/
# more /root/.config/pip/pip.conf
[global]
index-url = https://mirrors.cloud.tencent.com/pypi/simple/
trusted-host = mirrors.cloud.tencent.com

 

同步包到本地目录

# mkdir pypisoft
# pip2tgz /root/pypisoft/ pywbem==1.1.0

生成索引

# dir2pi /root/pypisoft/

离线安装

# pip install --index-url=file:///root/pypisoft/simple pywbem==1.1.0

 

 

 

 

 

 

列出模块

# pip list

 

 

 

卸载模块

# pip uninstall urllib3 -y

 

 

 

aaa

posted on 2022-07-18 13:47  长风1959  阅读(241)  评论(0编辑  收藏  举报