'How to set Python path for django project?

I want to set up an existing project from git. The default python of ubuntu 20.04 is python3.8 and on the project I need to use python3.9.

I installed anaconda which has python3.9, the project has a virtual env. when I want to install project dependencies I got this error:

> pipenv install
Warning: Your Pipfile requires python_version 3.9, but you are using None (/home/mahdi/.local/share/v/W/bin/python).
  $ pipenv check will surely fail.
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
alenvs/Project-UUOFIsQX/bin/python: not found

running which python3 resulting this:

> which python3
/home/mahdi/anaconda3/bin/python3


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source