简体   繁体   中英

How to run the .exe file in window exported from Mac machine

I am writing in Python and trying to export it as a.exe file from Mac machine. I tried to export it by auto-py-to-exe and it works well in my Mac machine. However, I found that it could not be opened in Window even I add the '.exe' after its file name. Is there any way to fix it or I can only export it in a Window machine? Thanks!

auto-py-to-exe seems to be a graphical interface for PyInstaller. According to the official PyInstaller docs

If you need to distribute your application for more than one OS, for example both Windows and Mac OS X, you must install PyInstaller on each platform and bundle your app separately on each.

You can do this from a single machine using virtualization. The free virtualBox or the paid VMWare and Parallels allow you to run another complete operating system as a “guest”. You set up a virtual machine for each “guest” OS. In it you install Python, the support packages your application needs, and PyInstaller.

So you would need to build it on a Windows or Windows VM to get it to work on Windows.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM