pip download的使用记录
生活随笔
收集整理的這篇文章主要介紹了
pip download的使用记录
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
實際開發中,我們的項目部署環境可能是封閉的內網環境,無法直接使用pip install -r requirement.txt這種方式安裝項目依賴包,這時pip download這個犀利的工具就要發光發熱了
備注:實際使用中,會發現一些包找不到,比如tornado,會報錯如下
ERROR: Could not find a version that satisfies the requirement tornado==6.0 (from -r src/requirements.txt (line 13)) (from versions: none) ERROR: No matching distribution found for tornado==6.0 (from -r src/requirements.txt (line 13))原因:沒有提供符合條件的二進制包
解決方法:使用非二進制包安裝 --no-binary=:all: package_name
pip download --no-binary=:all: tornado==6.0 -d pkg/sudo pip3 install -r /xxxx/xxxx/requirement.txt --no-index --find-links /xxxx/xxxxx/xxxxx/(存放下載好的包的目錄)
總結
以上是生活随笔為你收集整理的pip download的使用记录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 喝酒上脸是好是坏
- 下一篇: 通过pyinotify实现文件的监控,包