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?
Asked
Active
Viewed 135 times
-1
-
I haven't used http://www.pyinstaller.org/ myself, but it looks like it's worth a shot. – Christofer Ohlsson Jan 21 '16 at 15:26
2 Answers
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
-
This is what I've had to do. Installed Eclipse/PyDev then copied the code, – Al Lelopath Jan 21 '16 at 22:33
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