aerospaceresearch / orbitdeterminator

determination of satellite orbits and more
MIT License
181 stars 113 forks source link

Issue with llvmlite #196

Closed adigeak closed 4 years ago

adigeak commented 4 years ago

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 commented 4 years ago

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:

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 commented 4 years ago

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

and how pip install . will be helpful ?

astrojuanlu commented 4 years ago

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.