0

I'm trying to find out how to make Python program work on Mac computer. I've built a program using many Python modules like lxml,selenium etc. (PhantomJS.exe) and I've created an exe file using Py2Exe which works correctly but now, I've realised that it should be able to be executed on Mac. Is there a simple way to do that?

6
  • 1
    All Macs have Python installed already. Commented Feb 27, 2016 at 19:46
  • Macs cannot run .exe files. You'll likely need the source files that were used to create the .exe file, which you can simply run with the built-in Python interpreter on the command line. Commented Feb 27, 2016 at 19:47
  • 1
    Make sure those modules are installed on your Mac, and execute the original python script. You don't have to make an executable fie. Commented Feb 27, 2016 at 19:48
  • Yeah, but depends which Python version (in my case 2.7.10) and which modules are used there. Besides that, the program/script uses PhantomJS.exe which could be problem since OSx doesn't use exe. Commented Feb 27, 2016 at 19:49
  • Ultimately, your .exe isn't going to run on your Mac. You need the .py files that were used to create it - simply run python main.py, where main.py is the file containing the entry point (__main__?) to your program. Commented Feb 27, 2016 at 19:51

1 Answer 1

1

There is a mac alternative of py2exe, called py2app.

Sign up to request clarification or add additional context in comments.

1 Comment

@Milano Get them to install the Mac version of PhantomJS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.