Skip to content
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

Issue with llvmlite #196

Closed
adigeak opened this issue Jun 30, 2020 · 3 comments
Closed

Issue with llvmlite #196

adigeak opened this issue Jun 30, 2020 · 3 comments

Comments

@adigeak
Copy link

adigeak commented Jun 30, 2020

when i was installing it with python setup.py install. It broke in llvmlite.
i found that llvmlite pip have some problem.

  Using cached llvmlite-0.32.1.tar.gz (104 kB)
Building wheels for collected packages: llvmlite
  Building wheel for llvmlite (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/aditya-pc/anaconda3/envs/orbitdeterminator/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0n5rpiev/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0n5rpiev/llvmlite/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-3o4jilq3
       cwd: /tmp/pip-install-0n5rpiev/llvmlite/
  Complete output (26 lines):
  running bdist_wheel
  /home/aditya-pc/anaconda3/envs/orbitdeterminator/bin/python3.5 /tmp/pip-install-0n5rpiev/llvmlite/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/tmp/pip-install-0n5rpiev/llvmlite/ffi/build.py", line 106, in main_posix
      out = subprocess.check_output([llvm_config, '--version'])
    File "/home/aditya-pc/anaconda3/envs/orbitdeterminator/lib/python3.5/subprocess.py", line 626, in check_output
      **kwargs).stdout
    File "/home/aditya-pc/anaconda3/envs/orbitdeterminator/lib/python3.5/subprocess.py", line 693, in run
      with Popen(*popenargs, **kwargs) as process:
    File "/home/aditya-pc/anaconda3/envs/orbitdeterminator/lib/python3.5/subprocess.py", line 947, in __init__
      restore_signals, start_new_session)
    File "/home/aditya-pc/anaconda3/envs/orbitdeterminator/lib/python3.5/subprocess.py", line 1551, in _execute_child
      raise child_exception_type(errno_num, err_msg)
  FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/tmp/pip-install-0n5rpiev/llvmlite/ffi/build.py", line 192, in <module>
      main()
    File "/tmp/pip-install-0n5rpiev/llvmlite/ffi/build.py", line 182, in main
      main_posix('linux', '.so')
    File "/tmp/pip-install-0n5rpiev/llvmlite/ffi/build.py", line 109, in main_posix
      "to the path for llvm-config" % (llvm_config,))
  RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
  error: command '/home/aditya-pc/anaconda3/envs/orbitdeterminator/bin/python3.5' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite
    Running setup.py install for llvmlite ... error
    ERROR: Command errored out with exit status 1:
     command: /home/aditya-pc/anaconda3/envs/orbitdeterminator/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0n5rpiev/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0n5rpiev/llvmlite/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-3ou46a31/install-record.txt --single-version-externally-managed --compile --install-headers /home/aditya-pc/anaconda3/envs/orbitdeterminator/include/python3.5m/llvmlite
         cwd: /tmp/pip-install-0n5rpiev/llvmlite/
    Complete output (29 lines):
    running install
    running build
    got version from file /tmp/pip-install-0n5rpiev/llvmlite/llvmlite/_version.py {'version': '0.32.1', 'full': 'aa11b129c0b55973067422397821ae6d44fa5e70'}
    running build_ext
    /home/aditya-pc/anaconda3/envs/orbitdeterminator/bin/python3.5 /tmp/pip-install-0n5rpiev/llvmlite/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/tmp/pip-install-0n5rpiev/llvmlite/ffi/build.py", line 106, in main_posix
        out = subprocess.check_output([llvm_config, '--version'])
      File "/home/aditya-pc/anaconda3/envs/orbitdeterminator/lib/python3.5/subprocess.py", line 626, in check_output
        **kwargs).stdout
      File "/home/aditya-pc/anaconda3/envs/orbitdeterminator/lib/python3.5/subprocess.py", line 693, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/home/aditya-pc/anaconda3/envs/orbitdeterminator/lib/python3.5/subprocess.py", line 947, in __init__
        restore_signals, start_new_session)
      File "/home/aditya-pc/anaconda3/envs/orbitdeterminator/lib/python3.5/subprocess.py", line 1551, in _execute_child
        raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/tmp/pip-install-0n5rpiev/llvmlite/ffi/build.py", line 192, in <module>
        main()
      File "/tmp/pip-install-0n5rpiev/llvmlite/ffi/build.py", line 182, in main
        main_posix('linux', '.so')
      File "/tmp/pip-install-0n5rpiev/llvmlite/ffi/build.py", line 109, in main_posix
        "to the path for llvm-config" % (llvm_config,))
    RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
    error: command '/home/aditya-pc/anaconda3/envs/orbitdeterminator/bin/python3.5' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/aditya-pc/anaconda3/envs/orbitdeterminator/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0n5rpiev/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0n5rpiev/llvmlite/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-3ou46a31/install-record.txt --single-version-externally-managed --compile --install-headers /home/aditya-pc/anaconda3/envs/orbitdeterminator/include/python3.5m/llvmlite Check the logs for full command output.

on installing with anaconda it works fine.

conda install --channel=numba llvmlite

@astrojuanlu
Copy link
Contributor

The most recent version of llvmlite does not ship wheels for Python 3.5, as you can see here:

https://pypi.org/project/llvmlite/0.32.1/#files

Therefore, it downloads the source distribution and tries to compile it against a system LLVM, which you don't have (No such file or directory: 'llvm-config').

Ways to fix it:

  • Install llvmlite with conda (you already figured that out)
  • pip install llvmlite --prefer-binary (you will need a modern pip version for this)
  • Upgrade to Python 3.6+

Also, the Python ecosystem is moving away from setup.py and I'd recommend you to do pip install . instead (notice the final dot).

@adigeak
Copy link
Author

adigeak commented Jul 2, 2020

Can't we update the setup.py with the latest?(i can create a pull request)

and how pip install . will be helpful ?

@astrojuanlu
Copy link
Contributor

Updating setup.py with the latest won't help: precompiled wheels for llvmlite are not available for old Python versions. Yes, Python 3.5 is old already, it's End Of Life since last November.

Try creating a new conda environment, upgrade pip, and do pip install . --prefer-binary. It will work.

In any case, this is not an orbitdeterminator bug.

@adigeak adigeak closed this as completed Jul 6, 2020
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

2 participants