Python level is different.

Asked 2 years ago, Updated 2 years ago, 14 views

Once you see the version in the Python shell,

It comes out in 3 versions like the picture above, but when I checked it in cmd,

Is it coming out in 2 versions?

python

2022-09-21 23:15

1 Answers

echo %PATH%

You should check the PATH environment variable value with PATH and maybe the pass of Python 2.7 is ahead of the pass of 3.8, so that's how it works.

To use multiple versions of Python on Windows, you can use Python launcher.

py -2.7 python2script.py
py -2.7 -m pip install package2install

py -3 python3script.py
py -3 -m pip install package2install

You can use it with .

If possible, it is a good habit to create a virtual environment and activate it.


2022-09-21 23:15

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.