首页 > 其他分享 >How to use pip3 install the latest version package All In One

How to use pip3 install the latest version package All In One

时间:2023-05-17 10:37:53浏览次数:55  
标签:adafruit pip3 package circuitpython use install pip dht

How to use pip3 install the latest version package All In One

如何使用pip3安装最新版本包

PIP

$ python -m pip install [options] <requirement specifier> [package-index-options] ...
$ python -m pip install [options] -r <requirements file> [package-index-options] ...
$ python -m pip install [options] [-e] <vcs project url> ...
$ python -m pip install [options] [-e] <local project path> ...
$ python -m pip install [options] <archive url/path> ...

$ python -m pip install SomePackage            # latest version ❌ not work ❓ cache bug
$ python -m pip install 'SomePackage==1.0.4'   # specific version
$ python -m pip install 'SomePackage>=1.0.4'   # minimum version

$ python -m pip install --upgrade SomePackage
# 等价于
$ pip3 install --upgrade SomePackage

https://pip.pypa.io/en/stable/cli/pip_install/

image

https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-from-pypi

errors

can not install the latest version package ❌

$ sudo pip3 list | grep adafruit

$ sudo pip3 list | grep adafruit-circuitpython-dht
# adafruit-circuitpython-dht       4.0.0
$ sudo apt-get update

$ sudo pip3 install adafruit-circuitpython-dht

$ sudo pip3 list | grep adafruit-circuitpython-dht
# adafruit-circuitpython-dht       4.0.0

image

solutions

  1. --upgrade
$ sudo pip3 install --upgrade adafruit-circuitpython-dht

$ sudo pip3 list | grep adafruit-circuitpython-dht
# adafruit-circuitpython-dht       4.0.0

image

pip3 show package_name

$ pip3 show adafruit-circuitpython-dht

$ sudo pip3 show adafruit-circuitpython-dht
Name: adafruit-circuitpython-dht
Version: 4.0.1
Summary: CircuitPython support for DHT11 and DHT22 type temperature/humidity devices
Home-page: None
Author: None
Author-email: Adafruit Industries <[email protected]>
License: MIT
Location: /usr/local/lib/python3.9/dist-packages
Requires: Adafruit-Blinka
Required-by:

image

  1. specify a specific version number
# 指定具体的版本号
$ sudo pip3 install 'adafruit-circuitpython-dhtinstall==4.0.1'

demos

https://github.com/adafruit/Adafruit_CircuitPython_DHT/releases/tag/4.0.1

https://readthedocs.org/projects/adafruit-circuitpython-dht/downloads/pdf/3.2.2/

https://readthedocs.org/projects/adafruit-circuitpython-dht/

https://readthedocs.org/projects/adafruit-circuitpython-dht/downloads/pdf/4.0.1/

(

标签:adafruit,pip3,package,circuitpython,use,install,pip,dht
From: https://www.cnblogs.com/xgqfrms/p/17407729.html

相关文章