This repo contain practice question from Hackerrank.
- Check that the correct python version is showing up by opening python interpreter.
Try closing and reopening the terminal if it doesn't work the first time.
python --version
- Setup up virtual environment and activate it.
python -m venv venv source venv/bin/activate
- Install pip-tools.
pip install pip-tools
- Install dependencies
pip-sync requirements.txt
We will be using pip-tools for dependency management. This will help us to know how a specific package was installed in our venv. Do not run pip install <package_name>
or pip install -r requirements.txt
to install the packages. Please follow the steps to install and sync packages.
- Add package name to
requirements.in
- Run
pip-compile requirements.in
. This will create two new filesrequirements.txt
- Run
pip-sync requirements.txt
to install the updated packages in the requirements file.