-1

I have a Python (2.7.11) project created in Eclipse on Windows 10 that I want to run on OS X. This does not answer my question because it tells how to create an exe on windows and an executable on OS X (using py2app). I tried to install py2app on the Windows 10 machine, but that doesn't work. How do I do this?

Community
  • 1
  • 1
Al Lelopath
  • 6,448
  • 13
  • 82
  • 139

2 Answers2

2

You can't create an OS X app in Windows 10. You'll have to setup a python environment on OS X equal to the one in Windows 10, and copy the code over and use py2app or pyinstaller in OS X.

oystein-hr
  • 551
  • 4
  • 9
1

I do not have a Mac, but on Linux I just make the script executable.

$chmod u+x myscript.py

Then I add this to the header of myscript.py where /usr/bin/python is the path to the python binary.

#!/usr/bin/python
goCards
  • 1,388
  • 9
  • 10
  • Thanks for this, though I think it won't work for me because I have a 'project', with more than one .py file. – Al Lelopath Jan 21 '16 at 15:43
  • If you distribute all the source code files your main script can still do all the imports you need. – goCards Jan 21 '16 at 16:03