Python venv
Python venv (Virtual ENVironment) is the default solution for managing virtual environments and is shipped from Python 3.3+ on.
In your project run: python3 -m venv env.
Within this env folder, there will be activate scripts.
On Linux: source env/bin/activate.
On Windows: \env\Scripts\activate.
If you install packages while the environment is active, they will be installed under the env folder.
Make sure to add the env folder to the .gitignore file if you maintain your code in a repo.
Because you have a separate environment with the required packages for this specific project, you can easily create a list of minimal dependencies with pip freeze > requirements.txt.
N.B. to install from the requirements file, activate your environment and run pip install -r requirements.txt.