Cheku chuke
Cheku chuke

Reputation: 11

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!

Upvotes: 1

Views: 322

Answers (1)

sami-amer
sami-amer

Reputation: 264

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.

Upvotes: 1

Related Questions