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
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.
© 2024 OneMinuteCode. All rights reserved.