0
votes

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.

1
I find it strange that tik-tac-toe would require all those modules. Please show the command you used to try to run it - OneCricketeer
@cricket_007 I just drag the file from the file explorer into the command prompt and hit enter - JToholic
@MadisonCourto I have read that pose, but I don't understand what they are saying at all. My level is only using spyder to run simple models and other math stuff - JToholic
What file? That's not how you run Python code anyway. You manually have to type python game.py, for example - OneCricketeer
@cricket_007 it's the .py file I drag. Dragging was successful when the python file contains only simple math (like calculating prime numbers before 100) But anyway, the method you provide works. thx - JToholic

1 Answers

0
votes

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