This README provides essential Python setup and dependency management instructions.
This guide provides step-by-step instructions to create and activate a Python virtual environment using virtualenv.
- Python 3 must be installed on your system. → Download Python
- pip (Python package manager) should be available. It usually comes with Python, but if not, install it manually.
pip install virtualenvvirtualenv -p python3 envThis command creates a virtual environment named env using Python 3.
-
On Linux/MacOS:
source env/bin/activate -
On Windows:
env\Scripts\activate
When activated, your terminal prompt will typically show the environment name, for example:
(env) $
To exit or deactivate the environment:
deactivateAlways activate your virtual environment before installing packages to keep dependencies isolated from your global Python installation.
After activating your virtual environment, install packages using pip:
pip install package_nameGenerate a requirements.txt file that lists all installed packages and their versions:
pip freeze > requirements.txtTo reinstall all dependencies listed in the requirements.txt file:
pip install -r requirements.txtA wheelhouse is a local directory that stores pre-downloaded .whl files (Python wheels).
This allows you to reuse the same packages across multiple builds — useful for speeding up Docker image builds or offline installations.
Download all required packages into a wheelhouse folder:
pip download -r requirements.txt -d wheelhouse/Install packages directly from the local wheelhouse (without accessing PyPI):
pip install --no-index --find-links=wheelhouse -r requirements.txtUsing a wheelhouse ensures faster builds, repeatable installations, and offline compatibility — especially useful for Docker or CI/CD environments.
- Abhishek Rajput
- Palak Rajput