0

I need to share the script with someone who does not have Python over their system and can't install the libraries required. I can create an .exe on Windows but how do I create something that will run on a Mac too?

I intend to create an executable on my Windows system and share it with a user who has a Mac so they may run it.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
kashif197
  • 23
  • 3
  • 2
    What did you find so far when you searched for this in the internet? – mkrieger1 Nov 29 '20 at 10:22
  • 1
    Does this answer your question? [How to create a Mac OS X app with Python?](https://stackoverflow.com/questions/7261795/how-to-create-a-mac-os-x-app-with-python) – mkrieger1 Nov 29 '20 at 10:23
  • @mkrieger1 I found solutions to create an app on the system as in the question posted by you but I need create the app on windows and send it to a mac user. I can create a windows exe but that will not run over their mac. – kashif197 Nov 29 '20 at 10:30
  • MacOS ships with Python installed. Granted, older versions only ship with Python 2. – tripleee Nov 29 '20 at 11:03
  • 1
    Please [edit] your question to add the required context that makes it clear how none of the solutions you have found so far are working for you. – mkrieger1 Nov 29 '20 at 11:04

1 Answers1

1

I can think of three solutions to your case and I hope it provides useful information:

  1. The easiest solution is to install Python in someone's Mac and use py2app to create a Mac executable so that they can delete Python later and just keep the executable file.

  2. Tell them to install winebottler, one of the many solutions to run Windows executables on Mac. Keep in mind that since Mac OS Catalina, Macs only run 64-bit applications, so make sure you use a 64-bit Python Version if you go with this option.

  3. It is possible to run Mac on your Windows machine using an Oracle VirtualMachine VirtualBox or similar (shown in this tutorial). You would still have to install the version of Python you are running along with the necessary libraries and your script/files with yourself through something like Github or Dropbox. You will need a significant amount of extra RAM to run Mac OS on Windows and not hate your life while at it.

As someone who has been down that road because my job demanded me to, I highly recommend the first option, it's the shortest one and it doesn't demand any sort of IT prowess from the person you are sharing the application with. Also, as someone not too experienced with Mac OS, I feel like Apple makes it tricky to build executable files that run in more than one of their OS versions.