1

I am very new to programming, sorry for any stupid questions. As the title says, i tried running python files in pycharm and an error came up. Here's the error message:

Cannot run program "C:\Users\User\AppData\Local\Microsoft\WindowsApps\python3.10.exe" (in directory "C:\Users\User\Desktop\Programmering\100 days of python\day29"): CreateProcess error=1920, Systemet kan inte komma åt filen

I tried reinstalling python, but the same message came up. "Systemet kan inte komma åt filen" means "The system can't access the file". When i open the python 3.10exe under External Libraries\PythonSoftwareFoundations, it's empty, and so are the other files (python.exe and python3.exe) under C:\Users\User\AppData\Local\Microsoft\WindowsApps\python3.10.exe\PythonSoftwareFoundations.python3.10\

picture of the empty python3.10exe file

C:\Users\User\AppData\Local\Microsoft\WindowsApps\python3.10.exe

I don't know what the error=1920 means.

Appreciate all the help i can get.

Max
  • 11
  • 2
  • do you know how to open PowerShell ? or Windows cmd ? if so, can you type there `python3 --version` – OrenIshShalom Aug 04 '22 at 17:06
  • Does PyCharm have admin permission? – Mouse Aug 04 '22 at 17:07
  • Your Pycharm may be pointing at the wrong python. That one comes pre-installed on windows as an alias. See https://stackoverflow.com/q/58754860/12479639 – Axe319 Aug 04 '22 at 17:10
  • 2
    Based on the messages and the screenshot `C:\Users\User\AppData\Local\Microsoft\WindowsApps\python3.10.exe` is a folder, and that's why it can't be run. Because of the "WindowsApps" part my impression is that it may be coming from the Windows Store. If that's the case, consider downloading it from https://www.python.org/downloads/windows/ instead. – tevemadar Aug 04 '22 at 17:11
  • 1
    the screen-shorts are like clues for solving a windows riddle :)) – OrenIshShalom Aug 04 '22 at 17:13

1 Answers1

0

JetBrains support issue is the first item returned by a Google search.

Can you run Python from a terminal shell outside of PyCharm? If yes, do you know that it's the correct version?

Did you add a Python interpreter for your project in PyCharm? Try that.

duffymo
  • 305,152
  • 44
  • 369
  • 561