Python Tutorial, Release 3.9.5 Chapter 12. Virtual Environments and Packages 92 pip uninstall followed by one or more package names will remove the packages from the virtual environment. pip show will display information about a particular package: If you re-run this command,$_{pip}$ will notice that the requested version is already installed and do nothing. You can supply a different version number to get that version, or you can run$_{pip install --upgrade}$ to upgrade the package to the latest version: You can also install a specific version of a package by giving the package name followed by == and the version number: You can install the latest version of a package by specifying a package’s name: $_{pip}$has a number of subcommands: “install”, “uninstall”, “freeze”, etc. (Consult the installing-index guide for complete documentation for$_{pip}$.) You can install, upgrade, and remove packages using a program called $_{pip}$. By default$_{pip}$ will install packages from the Python Package Index, <https://pypi.org>. You can browse the Python Package Index by going to it in your web browser. Activating the virtual environment will change your shell’s prompt to show what virtual environment you’re using, and modify the environment so that running python will get you that particular version and installation of Python. For example: (This script is written for the bash shell. If you use the csh or fish shells, there are alternate$_{activate.csh}$ and activate.fish scripts you should use instead.) $source ~/envs/tutorial-env/bin/activate (tutorial-env )$ python Python 3.5.1 (default, May 62016 ,10 :59:36 ) ... >>> import sys >>> sys.path ['' ,'/usr/local/lib/python35.zip' , ..., '~/envs/tutorial-env/lib/python3.5/site-packages' ] >>> (tutorial-env )$ python -m pip install novas Collecting novas Downloading novas-3.1.1.3.tar.gz (136kB ) Installing collected packages: novas Running setup.py install for novas Successfully installed novas-3.1.1.3 (tutorial-env )$ python -m pip install requests==2.6.0 Collectingrequests==2.6.0 Using cached requests-2.6.0-py2.py3-none-any.whl Installing collected packages: requests Successfully installed requests-2.6.0 (tutorial-env )$ python -m pip install --upgrade requests Collecting requests Installing collected packages: requests Found existing installation: requests 2.6.0 Uninstalling requests-2.6.0: Successfully uninstalled requests-2.6.0 Successfully installed requests-2.7.0 12.3 Managing Packages with pip