2

If I use py -0, I get:

 -V:3.11 *        Python 3.11 (Store)

But if I use python -v, I get:

Python 3.10.10 | packaged by Anaconda, Inc. | (main, Mar 21 2023, 18:39:17) [MSC v.1916 64 bit (AMD64)] on win32

Why does py not recognize other Python versions? VS Code detects that I have 4 of them:

The result on cmd:

where python
C:\Users\ganuo\miniconda3\python.exe
C:\Users\ganuo\AppData\Local\Microsoft\WindowsApps\python.exe
C:\Program Files\Inkscape\bin\python.exe

where python3
C:\Users\ganuo\AppData\Local\Microsoft\WindowsApps\python3.exe

Strangely it doesn't show the Orange path.

Ooker
  • 1,969
  • 4
  • 28
  • 58

1 Answers1

1

Using where in cmd might help you

where python
where python3

Remove other versions and use the command

conda install python=3.11

pip and conda are two different package managers and do the same thing in a bit different ways and pip is Python specific whereas conda is not. You can get more info from SO question or article

py is a launcher of Windows which recognises all Python versions if it is setup installation to do so: - Install launcher for all users (recommended) installer It seems that neither orange or conda does so. You can run them individually it is preferable to use the Store version or from the official site and check mark on Install launcher for all users (recommended)
Read: Docs and article for details.

Bibhav
  • 1,579
  • 1
  • 5
  • 18
  • if I want to only use the latest version, what should I do to make sure all programs will run fine? Especially conda – Ooker Jun 02 '23 at 09:11
  • Does `where python` and `where python3` show all of the versions of Python you have? If so you can use `python3` for `Python 3.11` and `python` for `Python 3.10` – Bibhav Jun 02 '23 at 09:17
  • I've updated the results in my post. Strangely it doesn't show the Orange path. Is there a way to have `python` to run 3.11, and tell config conda to use that as well? – Ooker Jun 02 '23 at 09:31
  • See the edited answer. – Bibhav Jun 02 '23 at 13:01
  • would installing conda be the same with installing directly from the official page? – Ooker Jun 05 '23 at 09:50
  • If your question is to install Anaconda from the [`official page`](https://www.anaconda.com/download) then yes install conda if you don't have it already then install python by using `conda install -c anaconda python` to download the latest version of python as instructed [`here`](https://anaconda.org/anaconda/python) – Bibhav Jun 05 '23 at 11:47
  • no I mean the [official Python page](https://www.python.org/downloads/). Reading the [Known issues](https://docs.python.org/3/using/windows.html#known-issues "4. Using Python on Windows — Python 3.11.3 documentation") section for the MS package, I still don't see why `py` doesn't recognize it. In fact it only recognize that version, and ignore everything else – Ooker Jun 06 '23 at 07:25
  • Check the update! – Bibhav Jun 06 '23 at 11:07