Reputation: 1
I am trying to convert from. python2 to python3. Using "python --version", I was able to see that my PATH variable points to python2 and not python3 which I also have available on my machine. This become obvious whenever I type in alias python=python3, the result comes up as python 3.9.2 which is the latest version of python I installed recently.
The problem now, and where I have spent hours tryin to figure things out, is how to tell the interpreter to default on the updated version of python (python3) when I am using the IDE to run a program.
Thanks to all for your help.
Upvotes: 0
Views: 73
Reputation: 438
You should be using virtual environments ;)
pip install virtualenv
then make a virtual environment with:
python3 -m venv .env
You could replace .env
with whatever name you like. For more information on this, I'd suggest you take a look at the docs.
Upvotes: 1