To install packages using pip from a local directory, you can use the -r option to specify the path to the requirements.txt file.
To update pip itself from inside your virtual environment, you can use the following command:
To activate a virtual environment in Linux, you can use the source command and the path to the activate script that is located in the virtual environment's bin directory.
To leave a Python virtual environment, you can use the deactivate command.
To use a different Python version with virtualenv, follow these steps:
Here is an example of how you can use Python 3 in a virtual environment using the virtualenv package:
There are many different tools that you can use to create isolated Python environments, each with their own benefits and drawbacks.
The easiest way to remove all packages installed by pip is to use the command pip freeze to get a list of all installed packages, and then pipe that list to pip uninstall -y, like this: