pip相关命令
目录
- 下载指定python版本、指定架构依赖:
pip download --python-version 3.9 --only-binary :all: -d ./aarch64-python3.9.13-whls -r requirement.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --platform manylinux2014_aarch64 --platform manylinux_2_17_aarch64
-
python安装pip:使用源码安装setuptools,再安装pip
-
pip安装whl
pip install --no-index xxx.whl
- 从源码安装第三方库:
# 进入源码目录执行
python setup.py install
- 批量安装第三方库:
pip install --no-index --ignore-installed --find-links /path/to/your/whls -r /path/to/your/requirement.txt
-
anaconda安装目录
anaconda/pkgs
下都是编译好的模块,包括python,可以直接copy使用,注意要添加模块搜索路径到python-xxx/lib/python3.9/site-packages/easy-install.pth
-
查看python模块依赖关系:使用
pipdeptree
-
查看python模块版本:
pip show module_name
---