Win 10 user. I wrote a file (tik-tac-toe game) with spyder in anaconda. As I tried to run it with command prompt, I received "OSError: [WinError 193] %1 is not a valid Win32 application".
The modules I use are numpy, matplotlib and random. I used
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
which took quite a while. I'm not sure if there is an issue with the modules or other stuff.
I just drag the file from the file explorer into the command prompt and hit enter
I assume you dragged a .py
file.
Those aren't executable processes like an exe. They must be interpreted by the Python interpreter, meaning that you'd have to type out python game.py
, for example from that directory.
If you want to make an EXE, then you can search for options like pyinstaller or cx_freeze
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.