I have just installed PyInstaller 2.0 and I have been attempting to use it to create an executable of a python script. However, from terminal, when I cd into the directory pyinstaller-2.0 and run the command directed in the included README
text file as follows:
python pyinstaller.py Path/to/my/application.py
I receive an error message, that seems to indicate a syntax error in one of the PyInstaller files:
File "pyinstaller.py", line 26, in <module>
import PyInstaller.build
File "/Desktop/pyinstaller-2.0/PyInstaller/build.py", line 30, in <module>
import bindepend
File "/Desktop/pyinstaller-2.0/PyInstaller/bindepend.py", line 30, in <module>
from PyInstaller.depend import dylib
File "/Desktop/pyinstaller-2.0/PyInstaller/depend/dylib.py", line 149, in <module>
from PyInstaller.lib.macholib import util
File "/Desktop/pyinstaller-2.0/PyInstaller/lib/macholib/util.py", line 136
except (IOError, os.error) as why:
^
SyntaxError: invalid syntax
Is there a step I am missing? Is this a common error? I am using Python 2.5.1 on Mac OSX 10.5.8.
Python 2.5 does not use the except Exception as name:
format. Use except Exception, name:
instead.
For more information see http://docs.python.org/2.5/tut/node10.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.