Repository navigation
Closed
Description
Environment
- Pythonnet version: master from github
- Python version: 3.6.6
- Operating System: Ubuntu 18.04
- Mono: Mono JIT compiler version 5.14.0.177 (tarball Mon Aug 6 09:07:45 UTC 2018)
- Clang: clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
- gcc: gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
Details
-
Describe what you were trying to get done.
I wanted to install pythonnet.
-
What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
$ pip install pythonnet
Collecting pythonnet
Using cached https://files.pythonhosted.org/packages/89/3b/a22cd45b591d6cf490ee8b24d52b9db1f30b4b478b64a9b231c53474731e/pythonnet-2.3.0.tar.gz
Building wheels for collected packages: pythonnet
Running setup.py bdist_wheel for pythonnet ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-mm2agm3f/pythonnet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-wz7tt5qr --python-tag cp36:
running bdist_wheel
running build
running build_ext
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 3.5.0.
Updating NuGet.exe to 4.7.1.
Update successful.
MSBuild auto-detection: using msbuild version '15.0' from '/usr/lib/mono/msbuild/15.0/bin'.
Restoring NuGet package NUnit.ConsoleRunner.3.6.0.
Restoring NuGet package UnmanagedExports.1.2.7.
Restoring NuGet package NUnit.3.6.0.
Adding package 'NUnit.ConsoleRunner.3.6.0' to folder '/tmp/pip-install-mm2agm3f/pythonnet/packages'
Adding package 'UnmanagedExports.1.2.7' to folder '/tmp/pip-install-mm2agm3f/pythonnet/packages'
Adding package 'NUnit.3.6.0' to folder '/tmp/pip-install-mm2agm3f/pythonnet/packages'
Added package 'UnmanagedExports.1.2.7' to folder '/tmp/pip-install-mm2agm3f/pythonnet/packages'
Added package 'NUnit.ConsoleRunner.3.6.0' to folder '/tmp/pip-install-mm2agm3f/pythonnet/packages'
Added package 'NUnit.3.6.0' to folder '/tmp/pip-install-mm2agm3f/pythonnet/packages'
NuGet Config files used:
/home/kilometrics/.config/NuGet/NuGet.Config
Feeds used:
/home/kilometrics/.nuget/packages/
https://api.nuget.org/v3/index.json
Installed:
3 package(s) to packages.config projects
clang: warning: /usr/include/python3.6m: 'linker' input unused [-Wunused-command-line-argument]
Traceback (most recent call last):
File "tools/geninterop/geninterop.py", line 292, in <module>
sys.exit(main())
File "tools/geninterop/geninterop.py", line 274, in main
ast = parser.parse(python_h)
File "/usr/local/lib/python3.6/dist-packages/pycparser/c_parser.py", line 152, in parse
debug=debuglevel)
File "/usr/local/lib/python3.6/dist-packages/pycparser/ply/yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "/usr/local/lib/python3.6/dist-packages/pycparser/ply/yacc.py", line 1199, in parseopt_notrack
tok = call_errorfunc(self.errorfunc, errtoken, self)
File "/usr/local/lib/python3.6/dist-packages/pycparser/ply/yacc.py", line 193, in call_errorfunc
r = errorfunc(token)
File "/usr/local/lib/python3.6/dist-packages/pycparser/c_parser.py", line 1848, in p_error
column=self.clex.find_tok_column(p)))
File "/usr/local/lib/python3.6/dist-packages/pycparser/plyparser.py", line 67, in _parse_error
raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: /usr/include/crypt.h:33:6: before: __THROW
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-mm2agm3f/pythonnet/setup.py", line 405, in <module>
zip_safe=False,
File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/dist-packages/wheel/bdist_wheel.py", line 202, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/tmp/pip-install-mm2agm3f/pythonnet/setup.py", line 191, in build_extension
subprocess.check_call([sys.executable, geninterop, interop_file])
File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/geninterop/geninterop.py', 'src/runtime/interop36m.cs']' returned non-zero exit status 1.
----------------------------------------
Failed building wheel for pythonnet
Running setup.py clean for pythonnet
Failed to build pythonnet
Installing collected packages: pythonnet
Running setup.py install for pythonnet ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-mm2agm3f/pythonnet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-x4y7l5j6/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 4.7.1.
NuGet.exe is up to date.
MSBuild auto-detection: using msbuild version '15.0' from '/usr/lib/mono/msbuild/15.0/bin'.
All packages listed in packages.config are already installed.
clang: warning: /usr/include/python3.6m: 'linker' input unused [-Wunused-command-line-argument]
Traceback (most recent call last):
File "tools/geninterop/geninterop.py", line 292, in <module>
sys.exit(main())
File "tools/geninterop/geninterop.py", line 274, in main
ast = parser.parse(python_h)
File "/usr/local/lib/python3.6/dist-packages/pycparser/c_parser.py", line 152, in parse
debug=debuglevel)
File "/usr/local/lib/python3.6/dist-packages/pycparser/ply/yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "/usr/local/lib/python3.6/dist-packages/pycparser/ply/yacc.py", line 1199, in parseopt_notrack
tok = call_errorfunc(self.errorfunc, errtoken, self)
File "/usr/local/lib/python3.6/dist-packages/pycparser/ply/yacc.py", line 193, in call_errorfunc
r = errorfunc(token)
File "/usr/local/lib/python3.6/dist-packages/pycparser/c_parser.py", line 1848, in p_error
column=self.clex.find_tok_column(p)))
File "/usr/local/lib/python3.6/dist-packages/pycparser/plyparser.py", line 67, in _parse_error
raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: /usr/include/crypt.h:33:6: before: __THROW
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-mm2agm3f/pythonnet/setup.py", line 405, in <module>
zip_safe=False,
File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/tmp/pip-install-mm2agm3f/pythonnet/setup.py", line 191, in build_extension
subprocess.check_call([sys.executable, geninterop, interop_file])
File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/geninterop/geninterop.py', 'src/runtime/interop36m.cs']' returned non-zero exit status 1.
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-mm2agm3f/pythonnet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-x4y7l5j6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-mm2agm3f/pythonnet/
Metadata
Metadata
Assignees
Labels
No labels
Activity
den-run-ai commentedon Sep 25, 2018
@SamoPP there is a fix for this issue in this branch, but I have other issues in that PR related to mono/msbuild/nuget/travis-ci:
#698
rdnobrega commentedon Sep 26, 2018
HI @denfromufa , I'm having the exact same issue on my machine (Windows 10/64/py 3.7) when trying to install pythonnet. You said there is already a fix for this in this branch, though I don't know what that is and how do I fix it. Can you help me get this solved? I'm new to python and github it self so any clues would be nice.. ^^
den-run-ai commentedon Sep 26, 2018
@rdnobrega if you are new to python, it is probably just easier to use python 3.6 and upgrade later when python ecosystem has picked up considerably the new version 3.7.
you can install from PR branches according to wiki instructions:
https://github.com/pythonnet/pythonnet/wiki/Installation#github-installation-from-master-branch
on windows @cgohlke provides the unofficial wheels:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pythonnet
rdnobrega commentedon Sep 26, 2018
Thanks @denfromufa. I actually installed just fine on my old computer W8/32b/py36. However, i did not managed to install the py37 branch on my main computer. It gives this error:
Just putting here for dev's to see.. I'm gonna rollback to py36 as you suggested, thanks! ^^
SamoPP commentedon Sep 28, 2018
I am trying to install from pull request but it looks like I do not know how (please see below). Can you please guide me on how to install from mentioned pull request. Thanks.
$ pip install git+https://github.com/yagweb/pythonnet@py37 Collecting git+https://github.com/yagweb/pythonnet@py37 Cloning https://github.com/yagweb/pythonnet (to revision py37) to /tmp/pip-req-build-7sdv9clx Did not find branch or tag 'py37', assuming revision or ref. error: pathspec 'py37' did not match any file(s) known to git. Command "git checkout -q py37" failed with error code 1 in /tmp/pip-req-build-7sdv9clxden-run-ai commentedon Sep 28, 2018
@SamoPP wrong repo: "github.com/yagweb" should be "github.com/pythonnet"
den-run-ai commentedon Oct 21, 2018
this parsing error has been fixed and merged to master branch:
#698
alexbprofit commentedon Oct 20, 2021