Home > Blockchain >  pythonw.exe in python 3.9
pythonw.exe in python 3.9

Time:10-10

disclaimer: I'm a programming noob so don't laugh at my question !!

Hello all, I'm learning to code with python 3.9, but the resources I'm using are referred to a previous build. In one of the exercises I'm supposed to use pythonw.exe to run a script in the background, however I don't have such file in my installation folder.

After searching online, I have found that the file must have been automatically deleted by the antivirus during the install. So I uninstalled and reinstalled again while disabling the antivirus during the install (malwarebytes win defender), but pythonw is still missing.

At this point I don't know if there is another workaround or if there is an alternative to pythonw for version 3.9.. Anyone can help shed some light?

CodePudding user response:

pythonw.exe should be in the same directory as python.exe. For me (running Python 3.8) that is C:\Program Files\Python38. With a different install option, it probably would be in C:\Python38. (Yours would presumably have "Python39" where I have "Python38".)

Did you get your Python installation file from python.org? It should include pythonw.exe; if you got your distribution from somewhere else, it may be tailored differently.

The difference between python.exe and pythonw.exe is that pythonw.exe will avoid opening an extra window. If you don't care about that, go ahead and use python.exe.

By the way, I have both MalwareBytes and Windows Defender installed, and neither of those have ever deleted pythonw.exe for me, so I doubt that's your issue.

CodePudding user response:

Actually 5 minutes after posting the question I found the solution.

I reinstalled python enabling the option "install for all users". Now the file is there..

  • Related