0

Had python 3.9, tried to upgrade it to 3.11, didn't work. Uninstalling and reinstalling python didn't work either. So i deleted python from the paths, tried to run pip install python, now i get this error in the terminal:

Fatal error in launcher: Unable to create process using '"c:\program files\python39\python.exe"  "C:\Program Files\Python39\Scripts\pip.exe" install python': The system cannot find the file specified.

I even installed and ran the official python launcher, but if i type "python" in a terminal, it sends me to the microsoft store to download python from there.

The python path is already in the environment variables

I have no idea what to do, please help.

  • 2
    Something is fundamentally wrong here. Pip ships with Python, and it's not used to install Python. Learn [what pip is](https://realpython.com/what-is-pip/) and [set up a Python environment](https://realpython.com/effective-python-environment/). You'll want to [clean up your existing Python install](https://stackoverflow.com/a/3515928/10907280) before doing any of that though. – eccentricOrange Mar 05 '23 at 09:40
  • ok but how do you explain repairing/ installing python with the official launcher not working either? @eccentricOrange –  Mar 05 '23 at 09:47
  • @CyrilDeriane try using the `py` command instead of `python` – Wasi Master Mar 05 '23 at 10:40

3 Answers3

0

As mentioned in comment section, normally you wouldn't want to install python using pip. Delete python and related files, then download the python you wanted from the official site.

Check your environment, you should be able to see that your python folder added to there as PATH variable or you can add it yourself.

Then run python -m pip install --upgrade pip in cmd

MrPand
  • 25
  • 5
  • After using the official python launcher to install it, i ran your command and got: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases. Also python is indeed in the user variables. So i have no idea –  Mar 05 '23 at 09:55
  • As i said it has something to do with the environment tabs https://stackoverflow.com/questions/65348890/python-was-not-found-run-without-arguments-to-install-from-the-microsoft-store – MrPand Mar 05 '23 at 14:13
0

Nevermind, i guess it still works in vscode.

0

After installing python, you will have to use a new commandline window to be able to find the new environment. An already existing commandline window will not inherit environment changes made outside of it.

You can check your path by typing path. Is your Python in this Path?

You can call python from the start menu. There are several options in the python folder: enter image description here

Check: Do they work?

If it does work, and still in a new commandline window typing pythonresults in an error:

Try where python on the commandline. Does it find any instance of python? If not:

Try to find the correct path of your python and add it to your Path. You can do so by right-clicking on the Pythons Start-Menu entry and selecting the location. sorry, my Windows in screrenshot is unfortunately in German, but you get the point: enter image description here

maddes8cht
  • 569
  • 3
  • 16
  • nah i think the problem is pip. like a simple hello world works well so i think all the problems were pip all along. I closed this quest and asked about pip in another question –  Mar 05 '23 at 11:12
  • So if a simple python program does work, python itself does work too? So then, what exactly now is your problem? – maddes8cht Mar 05 '23 at 11:22