There is an error when I try to install magenta but I have no idea how to solve this problem
See original GitHub issueHello I have a question.
When I try to install magenta
pip install magenta-gpu
But I got error
Failed building wheel for python-rtmidi
and
Command “/home/jinsol/anaconda2/bin/python2.7 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-GPLeG_/python-rtmidi/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-XEAotx-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-GPLeG_/python-rtmidi/
And I also try to install development environment.
python setup.py develop
But I got error again
src/RtMidi.cpp:1101:10: fatal error: alsa/asoundlib.h: No such file or directory #include <alsa/asoundlib.h> ^~~~~~~~~~~~~~~~~~ compilation terminated. error: Setup script exited with error: command ‘/home/jinsol/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc’ failed with exit status 1
I installed python-rtmidi package and there is ‘alsa/asoundlib.h’ in /usr/include/ directory. I tried a lot of things but I have no idea how to solve this problem. Anybody help me?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
Can you try running this command before installing:
sudo apt-get -y install build-essential libasound2-dev libjack-dev libav-tools
I have also solved it. For my case, my gcc version was 4.3 which is too old for the python-rtmidi library. So I need to install gcc 6.3. After installing, you need to run the following line to check what is the name for the gcc that you install
dpkg -l | grep gcc | awk '{print $2}'
And it output the followingsSo, even I have installed gcc 6.3, the package name is actually gcc-6, then I run the following line to switch my default gcc to 6 (The last word in the following line is the version you want to change to).
ls -la /usr/bin/ | grep -oP "[\S]*(gcc|g\+\+)(-[a-z]+)*[\s]" | xargs bash -c 'for link in ${@:1}; do sudo ln -s -f "/usr/bin/${link}-${0}" "/usr/bin/${link}"; done' 6
I found most of my answer in this stack post https://askubuntu.com/questions/26498/how-to-choose-the-default-gcc-and-g-version