ideoforms/isobar

Trouble installing using pip3

Closed this issue · 1 comments

I tried to install isobar on Ubuntu 20.04, but got this:

(iso) $ pip3 install isobar
Collecting isobar
  Using cached isobar-0.1.1.tar.gz (61 kB)
Requirement already satisfied: mido in /tmp/iso/lib/python3.8/site-packages (from isobar) (1.2.9)
Requirement already satisfied: python-osc in /tmp/iso/lib/python3.8/site-packages (from isobar) (1.7.4)
Collecting python-rtmidi
  Using cached python-rtmidi-1.4.6.tar.gz (247 kB)
Using legacy 'setup.py install' for isobar, since package 'wheel' is not installed.
Using legacy 'setup.py install' for python-rtmidi, since package 'wheel' is not installed.
Installing collected packages: python-rtmidi, isobar
    Running setup.py install for python-rtmidi ... error
    ERROR: Command errored out with exit status 1:
     command: /tmp/iso/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-38din52k/python-rtmidi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-38din52k/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-record-x5klmiqg/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/iso/include/site/python3.8/python-rtmidi
         cwd: /tmp/pip-install-38din52k/python-rtmidi/
    Complete output (39 lines):
    Package jack was not found in the pkg-config search path.
    Perhaps you should add the directory containing `jack.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'jack' found
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/rtmidi
    copying rtmidi/version.py -> build/lib.linux-x86_64-3.8/rtmidi
    copying rtmidi/midiutil.py -> build/lib.linux-x86_64-3.8/rtmidi
    copying rtmidi/midiconstants.py -> build/lib.linux-x86_64-3.8/rtmidi
    copying rtmidi/__init__.py -> build/lib.linux-x86_64-3.8/rtmidi
    running egg_info
    writing python_rtmidi.egg-info/PKG-INFO
    writing dependency_links to python_rtmidi.egg-info/dependency_links.txt
    writing top-level names to python_rtmidi.egg-info/top_level.txt
    reading manifest file 'python_rtmidi.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files found matching '.appveyor.yml'
    warning: no previously-included files found matching '.travis.yml'
    warning: no previously-included files found matching '*.rst.in'
    no previously-included directories found matching 'ci'
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
    writing manifest file 'python_rtmidi.egg-info/SOURCES.txt'
    running build_ext
    building 'rtmidi._rtmidi' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/src
    creating build/temp.linux-x86_64-3.8/src/rtmidi
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D__RTMIDI_SILENCE_WARNINGS__ -D__LINUX_ALSA__ -D__UNIX_JACK__ -Isrc/rtmidi -I/tmp/iso/include -I/usr/include/python3.8 -c src/_rtmidi.cpp -o build/temp.linux-x86_64-3.8/src/_rtmidi.o
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D__RTMIDI_SILENCE_WARNINGS__ -D__LINUX_ALSA__ -D__UNIX_JACK__ -Isrc/rtmidi -I/tmp/iso/include -I/usr/include/python3.8 -c src/rtmidi/RtMidi.cpp -o build/temp.linux-x86_64-3.8/src/rtmidi/RtMidi.o
    src/rtmidi/RtMidi.cpp:2938:10: fatal error: jack/jack.h: Datei oder Verzeichnis nicht gefunden
     2938 | #include <jack/jack.h>
          |          ^~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /tmp/iso/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-38din52k/python-rtmidi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-38din52k/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-record-x5klmiqg/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/iso/include/site/python3.8/python-rtmidi Check the logs for full command output.

If jack is the JACK Audio Connection Kit, is jack so necessary today for audio?

I've just reproduced this on Ubuntu 20 and see exactly what you mean. I guess this is now a requirement for the RtMidi library, although I don't know exactly what's changed here - I know that jack does also provide MIDI I/O so it must be something connected to that.

Fix is to install libjack-dev:

apt install libjack-dev

I'll add this to the Linux requirements documentation. Thanks! Let me know if you have any further issues.