question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install fails on NVIDIA Jetson TX2

See original GitHub issue

Description

pip install fails on NVIDIA Jetson TX2

Steps/Code to Reproduce

unzip librosa-0.6.0.zip
cd librosa-0.6.0.zip
sudo pip install -e .

running install
    running build
    got version from file /tmp/pip-install-ZUciLA/llvmlite/llvmlite/_version.py {'version': '0.22.0', 'full': '46b4b5e288f3a175332ad68d8c3745c63fbb5701'}
    running build_ext
    /usr/bin/python /tmp/pip-install-ZUciLA/llvmlite/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/tmp/pip-install-ZUciLA/llvmlite/ffi/build.py", line 141, in <module>
        main()
      File "/tmp/pip-install-ZUciLA/llvmlite/ffi/build.py", line 131, in main
        main_posix('linux', '.so')
      File "/tmp/pip-install-ZUciLA/llvmlite/ffi/build.py", line 94, 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 '/usr/bin/python' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ZUciLA/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-v_Ud9g/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-ZUciLA/llvmlite/

Expected Results

Successfully install librosa

Actual Results

Install fail

Versions

ubuntu16.04 python 2.7.12

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
bmcfeecommented, Apr 19, 2018

This appears to be an llvmlite issue, not librosa. There are apparently no llvmlite wheels for your platform, so it’s trying to build from source. You don’t appear to have the LLVM development package installed, so it fails to build. Python packages cannot specify dependencies to ubuntu packages, so this is kind of unavoidable.

My guess is that you could fix this by apt-get installing llvm-dev and trying again.

1reaction
pfrieschcommented, Apr 25, 2018

lvm-dev did not work for me on ubuntu 16.04.


# install llvm & llvmlite for librosa
RUN apt-get install -y wget
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -

RUN echo deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main >> /etc/apt/sources.list
RUN echo deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main >> /etc/apt/sources.list

RUN apt-get update && apt-get install -y llvm-6.0

RUN update-alternatives --install \
        /usr/bin/llvm-config       llvm-config      /usr/bin/llvm-config-6.0  200 \
--slave /usr/bin/llvm-ar           llvm-ar          /usr/bin/llvm-ar-6.0 \
--slave /usr/bin/llvm-as           llvm-as          /usr/bin/llvm-as-6.0 \
--slave /usr/bin/llvm-bcanalyzer   llvm-bcanalyzer  /usr/bin/llvm-bcanalyzer-6.0 \
--slave /usr/bin/llvm-cov          llvm-cov         /usr/bin/llvm-cov-6.0 \
--slave /usr/bin/llvm-diff         llvm-diff        /usr/bin/llvm-diff-6.0 \
--slave /usr/bin/llvm-dis          llvm-dis         /usr/bin/llvm-dis-6.0 \
--slave /usr/bin/llvm-dwarfdump    llvm-dwarfdump   /usr/bin/llvm-dwarfdump-6.0 \
--slave /usr/bin/llvm-extract      llvm-extract     /usr/bin/llvm-extract-6.0 \
--slave /usr/bin/llvm-link         llvm-link        /usr/bin/llvm-link-6.0 \
--slave /usr/bin/llvm-mc           llvm-mc          /usr/bin/llvm-mc-6.0 \
--slave /usr/bin/llvm-mcmarkup     llvm-mcmarkup    /usr/bin/llvm-mcmarkup-6.0 \
--slave /usr/bin/llvm-nm           llvm-nm          /usr/bin/llvm-nm-6.0 \
--slave /usr/bin/llvm-objdump      llvm-objdump     /usr/bin/llvm-objdump-6.0 \
--slave /usr/bin/llvm-ranlib       llvm-ranlib      /usr/bin/llvm-ranlib-6.0 \
--slave /usr/bin/llvm-readobj      llvm-readobj     /usr/bin/llvm-readobj-6.0 \
--slave /usr/bin/llvm-rtdyld       llvm-rtdyld      /usr/bin/llvm-rtdyld-6.0 \
--slave /usr/bin/llvm-size         llvm-size        /usr/bin/llvm-size-6.0 \
--slave /usr/bin/llvm-stress       llvm-stress      /usr/bin/llvm-stress-6.0 \
--slave /usr/bin/llvm-symbolizer   llvm-symbolizer  /usr/bin/llvm-symbolizer-6.0 \
--slave /usr/bin/llvm-tblgen       llvm-tblgen      /usr/bin/llvm-tblgen-6.0


RUN pip3 install llvmlite
###

I don’t know if all the update-alternatives are necessary though

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jetson tx2 running Jetpack 4.2 pip install scikit_learn install fails
I am running into an issue installing when using the following: sudo pip install scikit_learn I have researched this issue and it has...
Read more >
pip install fails on NVIDIA Jetson TX2 - Google Groups
Description. pip install fails on NVIDIA Jetson TX2. Steps/Code to Reproduce. `unzip librosa-0.6.0.zip cd librosa-0.6.0.zip sudo pip install -e .
Read more >
problem with tensorflow instalation on nvidia jetson tx2
pip 21.3.1. I did step by step instruction provided by nvidia (https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson ...
Read more >
jetson-stats - PyPI
jetson -stats is a package for monitoring and control your NVIDIA Jetson [Xavier NX, ... virtualenv venv source venv/bin/activate pip install -U jetson-stats ......
Read more >
How to Install Caffe and PyCaffe on Jetson TX2 - JK Jung's blog
The directory '/home/nvidia/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found