To create a virtual environment, go to the root of your project and run
python -m venv venv
It will create a virtual environment called venv
.\venv\Scripts\activate
pip install jupyter matplotlib numpy pandas scipy scikit-learn
or
python -m pip install -U jupyter matplotlib numpy pandas scipy scikit-learn
pip freeze > requirements.txt
deactivate
pip install -r requirements.txt
Place the requirements.txt
file in the root of your project directory. When ready to install the dependencies, ensure your terminal is navigated to the project directory and your virtual environment is activated. Then, run pip install -r requirements.txt
to install the listed packages within your virtual environment.
Pasting these 3 for even easier access:
python -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt