Closed ThaDeanesta closed 11 years ago
It appears you're using an improperly configured python installation. Note that the SIP files are shown in /usr/local/lib/python2.7, and your distutils files are found in ... python3/3.3.0 .
That particular error is because python3 got rid of the file function, which was present in python3. I suggest upgrading to the latest version of SIP, which fixes this issue, and ensure that your environment is not mixed (ie, only using python 2.7, or only using python3.3).
See http://docs.python.org/release/3.0/whatsnew/3.0.html#builtins . The 'file' function was removed in favor of 'open'. An examination of SIP 4.14.2 source code shows that this has been changed.
When i attempt to install on both Linux (Ubuntu 12.04) and Mac OS, there appears to be an issue between SIP and PyNetworkTables. Both are running Python3, however I tested on Multiple versions of SIP.
The traceback is posted below (With my username removed)
Somebody's-MacBook-Air:pynetworktables USERNAME$ ROBOTPY="../robotpy" python3 setup.py build running build running build_ext building 'pynetworktables' extension /usr/local/Cellar/sip/4.13.3/bin/sip -g -e -I /Users/USERNAME/pynetworktables/sip -I /Users/USERNAME/robotpy/Packages/wpilib/sip -c build/temp.macosx-10.8-x86_64-3.3 -b build/temp.macosx-10.8-x86_64-3.3/module.sbf -I /usr/local/share/sip /Users/USERNAME/pynetworktables/sip/module.sip Traceback (most recent call last): File "setup.py", line 119, in
cmdclass = {'build_ext': custom_build_ext}
File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/dist.py", line 917, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/command/build.py", line 126, in run
self.run_command(cmd_name)
File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/command/build_ext.py", line 347, in run
self.build_extensions()
File "setup.py", line 101, in build_extensions
sipdistutils.build_ext.build_extensions(self)
File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/command/build_ext.py", line 456, in build_extensions
self.build_extension(ext)
File "/usr/local/lib/python2.7/site-packages/sipdistutils.py", line 111, in build_extension
build_ext_base.build_extension(self, ext)
File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/command/build_ext.py", line 483, in build_extension
sources = self.swig_sources(sources, ext)
File "/usr/local/lib/python2.7/site-packages/sipdistutils.py", line 153, in swig_sources
out = self._get_sip_output_list(sbf)
File "/usr/local/lib/python2.7/site-packages/sipdistutils.py", line 58, in _get_sip_output_list
for L in file(sbf):
NameError: global name 'file' is not defined