To better control the development environment of your python project and ensure that your older project don’t break when updating packages, it is recommended to create a dedicated environment for your project.
For that purpose you can use python virtual environment.
Create environment:
python3 -m venv env
Activate environment:
source env/bin/activate