pythonnet 2.2.1 on linux fails in python 3.4 and 3.5 (but not 2.7) - pycparser error
dta@dta-Inspiron-N5050 ~ $ sudo pip3 install pythonnet -U --force
Downloading/unpacking pythonnet
Downloading pythonnet-2.2.1.tar.gz (1.5MB): 1.5MB downloaded
Running setup.py (path:/tmp/pip_build_root/pythonnet/setup.py) egg_info for package pythonnet
Installing collected packages: pythonnet
Found existing installation: pythonnet 2.2.0
Can't uninstall 'pythonnet'. No files were found to uninstall.
Running setup.py install for pythonnet
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 3.5.0.
NuGet.exe is up to date.
MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'.
Restoring NuGet package UnmanagedExports.1.2.7.
Restoring NuGet package NUnit.2.6.2.
Adding package 'UnmanagedExports.1.2.7' to folder '/tmp/pip_build_root/pythonnet/packages'
Adding package 'NUnit.2.6.2' to folder '/tmp/pip_build_root/pythonnet/packages'
Added package 'NUnit.2.6.2' to folder '/tmp/pip_build_root/pythonnet/packages'
Added package 'UnmanagedExports.1.2.7' to folder '/tmp/pip_build_root/pythonnet/packages'
NuGet Config files used:
/home/dta/.config/NuGet/NuGet.Config
Feeds used:
/home/dta/.nuget/packages/
https://api.nuget.org/v3/index.json
Installed:
2 package(s) to packages.config projects
clang: warning: /usr/include/python3.4m: 'linker' input unused
Traceback (most recent call last):
File "tools/geninterop/geninterop.py", line 296, in <module>
sys.exit(main())
File "tools/geninterop/geninterop.py", line 278, in main
ast = parser.parse(python_h)
File "/usr/local/lib/python3.4/dist-packages/pycparser/c_parser.py", line 151, in parse
debug=debuglevel)
File "/usr/local/lib/python3.4/dist-packages/pycparser/ply/yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "/usr/local/lib/python3.4/dist-packages/pycparser/ply/yacc.py", line 1181, in parseopt_notrack
tok = call_errorfunc(self.errorfunc, errtoken, self)
File "/usr/local/lib/python3.4/dist-packages/pycparser/ply/yacc.py", line 193, in call_errorfunc
r = errorfunc(token)
File "/usr/local/lib/python3.4/dist-packages/pycparser/c_parser.py", line 1721, in p_error
column=self.clex.find_tok_column(p)))
File "/usr/local/lib/python3.4/dist-packages/pycparser/plyparser.py", line 55, in _parse_error
raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: /usr/bin/../lib/clang/3.4/include/stdarg.h:30:27: before: va_list
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip_build_root/pythonnet/setup.py", line 376, in <module>
setup_requires=setup_requires
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.4/distutils/command/install.py", line 583, in run
self.run_command('build')
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.4/distutils/command/build.py", line 126, in run
self.run_command(cmd_name)
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.4/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/usr/lib/python3.4/distutils/command/build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "/tmp/pip_build_root/pythonnet/setup.py", line 182, in build_extension
_check_output([sys.executable, geninterop, interop_file])
File "/tmp/pip_build_root/pythonnet/setup.py", line 299, in _check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/geninterop/geninterop.py', 'src/runtime/interop34m.cs']' returned non-zero exit status 1
Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pythonnet/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ib7zyd1f-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 3.5.0.
NuGet.exe is up to date.
MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'.
Restoring NuGet package UnmanagedExports.1.2.7.
Restoring NuGet package NUnit.2.6.2.
Adding package 'UnmanagedExports.1.2.7' to folder '/tmp/pip_build_root/pythonnet/packages'
Adding package 'NUnit.2.6.2' to folder '/tmp/pip_build_root/pythonnet/packages'
Added package 'NUnit.2.6.2' to folder '/tmp/pip_build_root/pythonnet/packages'
Added package 'UnmanagedExports.1.2.7' to folder '/tmp/pip_build_root/pythonnet/packages'
NuGet Config files used:
/home/dta/.config/NuGet/NuGet.Config
Feeds used:
/home/dta/.nuget/packages/
https://api.nuget.org/v3/index.json
Installed:
2 package(s) to packages.config projects
clang: warning: /usr/include/python3.4m: 'linker' input unused
Traceback (most recent call last):
File "tools/geninterop/geninterop.py", line 296, in <module>
sys.exit(main())
File "tools/geninterop/geninterop.py", line 278, in main
ast = parser.parse(python_h)
File "/usr/local/lib/python3.4/dist-packages/pycparser/c_parser.py", line 151, in parse
debug=debuglevel)
File "/usr/local/lib/python3.4/dist-packages/pycparser/ply/yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "/usr/local/lib/python3.4/dist-packages/pycparser/ply/yacc.py", line 1181, in parseopt_notrack
tok = call_errorfunc(self.errorfunc, errtoken, self)
File "/usr/local/lib/python3.4/dist-packages/pycparser/ply/yacc.py", line 193, in call_errorfunc
r = errorfunc(token)
File "/usr/local/lib/python3.4/dist-packages/pycparser/c_parser.py", line 1721, in p_error
column=self.clex.find_tok_column(p)))
File "/usr/local/lib/python3.4/dist-packages/pycparser/plyparser.py", line 55, in _parse_error
raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: /usr/bin/../lib/clang/3.4/include/stdarg.h:30:27: before: va_list
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip_build_root/pythonnet/setup.py", line 376, in <module>
setup_requires=setup_requires
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.4/distutils/command/install.py", line 583, in run
self.run_command('build')
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.4/distutils/command/build.py", line 126, in run
self.run_command(cmd_name)
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.4/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/usr/lib/python3.4/distutils/command/build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "/tmp/pip_build_root/pythonnet/setup.py", line 182, in build_extension
_check_output([sys.executable, geninterop, interop_file])
File "/tmp/pip_build_root/pythonnet/setup.py", line 299, in _check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/geninterop/geninterop.py', 'src/runtime/interop34m.cs']' returned non-zero exit status 1
----------------------------------------
Can't roll back pythonnet; was not uninstalled
Cleaning up...
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pythonnet/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ib7zyd1f-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pythonnet
Storing debug log for failure in /home/dta/.pip/pip.log
dta@dta-Inspiron-N5050 ~ $