- 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 ...