- Secret Recipes of the Python Ninja
- Cody Jackson
- 125字
- 2021-06-25 22:14:40
How to do it...
- Use pip to pull the latest version of the package directly from PyPI:
$ pip install <package_name>
- Alternately, a specific version of the package can be downloaded:
$ pip install <package_name>==1.2.2
Here is an example of downgrading pygments from our earlier install in pipenv:
- As a final option, a minimum version of a package can be downloaded; this is common when a package has a significant change between versions:
$ pip install "<package_name> >= 1.1"
- If a PyPI package has a wheel file available, pip will automatically download the wheel; otherwise, it will pull the source code and compile it.
$ pip install <some_package>
- To install a local wheel file, provide the full path to the file:
$ pip install /local_files/SomePackage-1.2-py2.py3-none-any.whl
推薦閱讀
- 黑客攻防從入門到精通(實戰秘笈版)
- Flask Web全棧開發實戰
- Learn ECMAScript(Second Edition)
- Redis Applied Design Patterns
- CMDB分步構建指南
- 機器人Python青少年編程開發實例
- Learning SQLite for iOS
- Building a Recommendation Engine with Scala
- 深度強化學習算法與實踐:基于PyTorch的實現
- Citrix XenServer企業運維實戰
- 零基礎學C語言程序設計
- Julia數據科學應用
- Flink技術內幕:架構設計與實現原理
- OpenCV Android開發實戰
- Web前端開發技術:HTML、CSS、JavaScript