Virtual environment (pipenv)
Python has another tool that name is Pipenv. This tool combines pip and Venv to the one tool. Pipenv for python like npm for javascript.
pip install pipenv
Then
pipenv install request
For activate a virtual environment
pipenv shell
For deactivate
exit
When we use pipenv for virtual environment it create two file in the project directory with name "Pipfile" and "Pipfile.lock". When you want to move the project to another computer you can use this file to install the dependency of the project.
If you want to install dependency with the latest version that release you should use Pipfile
pipenv install
But if you want to install dependency with specific version you should use Pipfile.lock
pipenv install --ignore-pipfile
If you want to know about the dependency of the package you can use the below command
pipenv graph
requests==2.24.0- certifi [required: >=2017.4.17, installed: 2020.6.20]- chardet [required: >=3.0.2,<4, installed: 3.0.4]- idna [required: >=2.5,<3, installed: 2.10]- urllib3 [required: >=1.21.1,<1.26,!=1.25.1,!=1.25.0, installed: 1.25.10]
If you want to update the package you can use the below command
pipenv update --outdated
or
pipenv update SPECIFIC_PACKAGE
