8000 Failure to install - No such file or directory: 'clang': 'clang' · Issue #706 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

Failure to install - No such file or directory: 'clang': 'clang' #706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CaerphillyMediaLtd opened this issue Jul 24, 2018 · 4 comments
Closed

Comments

@CaerphillyMediaLtd
Copy link
CaerphillyMediaLtd commented Jul 24, 2018

Environment

  • Pythonnet version: Latest pip, and latest master
  • Python version: Tried 3.5 and 3.6
  • Operating System: Ubuntu LTS 16.04

Details

First I had an error that pycparser could not be found, so I installed that. But now I get the following log error on Python versions 3.5, a fresh 3.6 install and on both the master branch and the latest pip version.

Edit: I installed the dependencies (that aren't listed anywhere on here?), now I get:

pip3.6 install git+https://github.com/pythonnet/pythonnet -U --force
Collecting git+https://github.com/pythonnet/pythonnet
Cloning https://github.com/pythonnet/pythonnet to /tmp/pip-req-build-by21uqez
Building wheels for collected packages: pythonnet
Running setup.py bdist_wheel for pythonnet ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-by21uqez/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-ucqyme5m --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 4.1.0.
Updating NuGet.exe to 4.6.2.
Update successful.
MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'.
Restoring NuGet package NUnit.ConsoleRunner.3.7.0.
Restoring NuGet package UnmanagedExports.1.2.7.
Restoring NuGet package NUnit.3.7.1.
Adding package 'NUnit.3.7.1' to folder '/tmp/pip-req-build-by21uqez/packages'
Adding package 'NUnit.ConsoleRunner.3.7.0' to folder '/tmp/pip-req-build-by21uqez/packages'
Adding package 'UnmanagedExports.1.2.7' to folder '/tmp/pip-req-build-by21uqez/packages'
Added package 'UnmanagedExports.1.2.7' to folder '/tmp/pip-req-build-by21uqez/packages'
Added package 'NUnit.ConsoleRunner.3.7.0' to folder '/tmp/pip-req-build-by21uqez/packages'
Added package 'NUnit.3.7.1' to folder '/tmp/pip-req-build-by21uqez/packages'

NuGet Config files used:
    /tmp/pip-req-build-by21uqez/NuGet.config
    /home/levi/.config/NuGet/NuGet.Config

Feeds used:
    /home/levi/.nuget/packages/
    https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
    https://api.nuget.org/v3/index.json

Installed:
    3 package(s) to packages.config projects
clang: warning: /usr/include/python3.6m: 'linker' input unused
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 "/home/levi/.local/lib/python3.6/site-packages/pycparser/c_parser.py", line 152, in parse
    debug=debuglevel)
    File "/home/levi/.local/lib/python3.6/site-packages/pycparser/ply/yacc.py", line 331, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
    File "/home/levi/.local/lib/python3.6/site-packages/pycparser/ply/yacc.py", line 1199, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
    File "/home/levi/.local/lib/python3.6/site-packages/pycparser/ply/yacc.py", line 193, in call_errorfunc
    r = errorfunc(token)
    File "/home/levi/.local/lib/python3.6/site-packages/pycparser/c_parser.py", line 1761, in p_error
    column=self.clex.find_tok_column(p)))
    File "/home/levi/.local/lib/python3.6/site-packages/pycparser/plyparser.py", line 66, 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-req-build-by21uqez/setup.py", line 527, in <module>
    zip_safe=False,
    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 "/tmp/pip-req-build-by21uqez/setup.py", line 475, in run
    return bdist_wheel.bdist_wheel.run(self)
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 179, 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-req-build-by21uqez/setup.py", line 220, 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.6', '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.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-by21uqez/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-syp7odc_/install-record.txt --single-version-externally-managed --compile:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
    or: -c --help [cmd1 cmd2 ...]
    or: -c --help-commands
    or: -c cmd --help
    
    error: option --single-version-externally-managed not recognized
    
    ----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-by21uqez/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-syp7odc_/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-req-build-by21uqez/
@CaerphillyMediaLtd CaerphillyMediaLtd changed the title Failure to install - Error in geninterop.py line 292 Failure to install Jul 24, 2018
@CaerphillyMediaLtd CaerphillyMediaLtd changed the title Failure to install Failure to install - No such file or directory: 'clang': 'clang' Jul 24, 2018
@CaerphillyMediaLtd
Copy link
Author

Ok I got it working on 3.5, guess it relates to the other issues here.

@den-run-ai
Copy link
Contributor

Closing since this is a duplicate of this issue:

#609 (comment)

@stpatrick2016
Copy link

I had the same issue building linux docker image with Python 3.7. Solved by installing clang and python-clang like this in the Dockerfile:
RUN apt-get -y install --no-install-recommends clang python-clang

@xqliang
Copy link
xqliang commented Jun 8, 2023

apt-get -y install clang works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0