pip

pip 设置

pip config set global.extra-index-url https://pypi.ngc.nvidia.com
pip config set global.index-url  https://pypi.org/simple
pip config set global.no-cache-dir true
pip config set global.trusted-host pypi.ngc.nvidia.com

pip config list
# global.extra-index-url='\nhttps://pypi.ngc.nvidia.com'
# global.index-url='https://pypi.org/simple'
# global.no-cache-dir='true'
# global.trusted-host='\npypi.ngc.nvidia.com'

生成 requirements.txt

pip install pipreqs

pipreqs ./ --encoding=utf8 --force
# --encoding=utf8 :为使用utf8编码
# --force :强制执行,当 生成目录下的requirements.txt存在时覆盖 
# ./: 在哪个文件生成requirements.txt 文件
Table of Contents