So, how can we use different versions of python for different applications?
The solution for this problem is to create a virtual environment, a self-contained directory tree that contains a Python installation for a specific version of Python, and other additional packages needed by the application itself.
If you're using python3:
python3 -m pip install --user virtualenv
Create virtual environment:
python3 -m venv venv
Activate it:
source venv/bin/activate
Then try:
which python
If everything is ok, you should get:
.../venv/bin/python
No comments:
Post a Comment