Python Forum
.py to exe error "oserror winerror 193"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.py to exe error "oserror winerror 193"
#2
Look as this Thread it can help.
You need to figure out what's the main version in Environment Variables Path.
Thonny comes with own build in Python version for ease of use,but you can also use python.org version.

Do this from command line(cmd)
# Test python
C:\>python -c "import sys; print(sys.executable)"
C:\python37\python.exe

# Test pip
C:\>pip -V
pip 19.3.1 from c:\python37\lib\site-packages\pip (python 3.7)

# Where is pyinstaller
C:\>where pyinstaller
C:\Python37\Scripts\pyinstaller.exe
C:\Python38\Scripts\pyinstaller.exe

C:\>
So my main version is Windows Path is Python 3.7,so if i do this.
C:\>pyinstaller --onefile some.py
It will use Python 3.7,this is same all folder in cmd as it's main version in Path.
If i go into C:\Python38\Scripts\ folder and do the same it will pyinstaller(not work yet 3.8) with Python 3.8.

Can have may version i have lot,just need to understand how Windows see this and have one main version.
py can be used to assess all standard versions version.
E:\div_code
λ py -0
Installed Pythons found by py Launcher for Windows
 -3.8-32 *
 -3.7-32
 -3.6-32
 -3.5-32
 -3.4-32
 -2.7-32
Quote:Is it that my windows is 32 bit, and my python3 is the 64 bit version?
If you start python from command line(cmd) you will see if Python version is 32-bit or 64-bit.
[MSC v.1916 32 bit (Intel)] --> 32-bit 
[MSC v.1915 64 bit (AMD64)] --> 64-bit
Reply


Messages In This Thread
RE: .py to exe error "oserror winerror 193" - by snippsat - Nov-30-2019, 12:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  OSError occurs in Linux. anna17 2 536 Mar-23-2024, 10:00 PM
Last Post: snippsat
  FileNotFoundError: [WinError 2] The system cannot find the file specified NewBiee 2 1,813 Jul-31-2023, 11:42 AM
Last Post: deanhystad
  OSError with SMPT script Milan 0 904 Apr-28-2023, 01:34 PM
Last Post: Milan
  OSERROR When mkdir Oshadha 4 1,971 Jun-29-2022, 08:50 AM
Last Post: DeaD_EyE
  WinError 2, since fresh new Windows 10 install alok 1 1,769 Jan-06-2022, 11:20 PM
Last Post: lucasbazan
  OSError: Unable to load libjvm when connecting to hdfs with pyarrow 3.0.0 aupres 0 3,353 Mar-22-2021, 10:25 AM
Last Post: aupres
  pyarrow throws oserror winerror 193 1 is not a valid win32 application aupres 2 3,957 Oct-21-2020, 01:04 AM
Last Post: aupres
  WinError 87 while running .exe file Timych 0 2,509 Aug-06-2020, 02:36 PM
Last Post: Timych
  Sublime Text 3 WinError 2 File Specified HelloWorld17 0 2,900 Apr-02-2020, 09:03 AM
Last Post: HelloWorld17
  OSError: [Errno 26] Text file busy: '/var/tmp/tmp5qbeydbp batchenr 1 4,367 Mar-20-2020, 01:58 PM
Last Post: ibreeden

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020