Closed FREQ-EE closed 1 year ago
I thought my issue was because I was running with python3.10. I have now set up the project in a virtual environment with python3.9, but still have problems with pip install python-rtmidi
with the following error:
pip install python-rtmidi
Collecting python-rtmidi
Using cached python-rtmidi-1.4.9.tar.gz (251 kB)
Preparing metadata (setup.py) ... done
Installing collected packages: python-rtmidi
DEPRECATION: python-rtmidi is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for python-rtmidi ... error
error: subprocess-exited-with-error
× Running setup.py install for python-rtmidi did not run successfully.
│ exit code: 1
╰─> [34 lines of output]
Detected JACK version 1.9.20.
JACK version is recent enough to have 'jack_port_rename' function.
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/rtmidi
copying rtmidi/__init__.py -> build/lib.linux-x86_64-3.9/rtmidi
copying rtmidi/midiconstants.py -> build/lib.linux-x86_64-3.9/rtmidi
copying rtmidi/midiutil.py -> build/lib.linux-x86_64-3.9/rtmidi
copying rtmidi/version.py -> build/lib.linux-x86_64-3.9/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 '*'
adding license file 'LICENSE.txt'
adding license file 'AUTHORS.rst'
writing manifest file 'python_rtmidi.egg-info/SOURCES.txt'
running build_ext
building 'rtmidi._rtmidi' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
creating build/temp.linux-x86_64-3.9/src/rtmidi
x86_64-linux-gnu-gcc -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__ -DJACK_HAS_PORT_RENAME -Isrc/rtmidi -I/home/freqee/musicgen/magenta-env/include -I/usr/include/python3.9 -c src/_rtmidi.cpp -o build/temp.linux-x86_64-3.9/src/_rtmidi.o
error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> python-rtmidi
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I'll keep trying, perhaps with an even earlier version of python in a venv. In the meantime, I eagerly await some help.
You need to install a C compiler and build-tools. Under debian/Ubuntu this is usually accomplished by installing build-essential
.
Hi @SpotlightKid, so happy to hear from you!
I just ran sudo apt install build-essential
and it installed successfully. I then ran pip install magenta
again but still encountered some errors. Am I missing something simple here?
Log follows:
$ pip install magenta
Collecting magenta
Using cached magenta-2.1.4-py3-none-any.whl (1.4 MB)
Collecting tensorflow==2.9.1
Using cached tensorflow-2.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (511.7 MB)
Collecting mir-eval==0.7
Using cached mir_eval-0.7-py3-none-any.whl
Collecting Pillow==9.2.0
Using cached Pillow-9.2.0-cp39-cp39-manylinux_2_28_x86_64.whl (3.2 MB)
Collecting sk-video==1.1.10
Using cached sk_video-1.1.10-py2.py3-none-any.whl (2.3 MB)
Collecting imageio==2.20.0
Using cached imageio-2.20.0-py3-none-any.whl (3.4 MB)
Collecting pygtrie==2.5.0
Using cached pygtrie-2.5.0-py3-none-any.whl (25 kB)
Collecting numba==0.49.1
Using cached numba-0.49.1.tar.gz (2.0 MB)
Preparing metadata (setup.py) ... done
Collecting tensorflow-datasets==4.6.0
Using cached tensorflow_datasets-4.6.0-py3-none-any.whl (4.3 MB)
Collecting numpy==1.21.6
Using cached numpy-1.21.6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
Collecting dm-sonnet==2.0.0
Using cached dm_sonnet-2.0.0-py3-none-any.whl (254 kB)
Collecting tensorflow-probability==0.17.0
Using cached tensorflow_probability-0.17.0-py2.py3-none-any.whl (6.5 MB)
Collecting sox==1.4.1
Using cached sox-1.4.1-py2.py3-none-any.whl (39 kB)
Collecting tf-slim==1.1.0
Using cached tf_slim-1.1.0-py2.py3-none-any.whl (352 kB)
Collecting note-seq==0.0.3
Using cached note_seq-0.0.3-py3-none-any.whl (210 kB)
Collecting librosa==0.7.2
Using cached librosa-0.7.2-py3-none-any.whl
Collecting scikit-image==0.19.3
Using cached scikit_image-0.19.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.0 MB)
Collecting pretty-midi==0.2.9
Using cached pretty_midi-0.2.9-py3-none-any.whl
Collecting absl-py==1.2.0
Using cached absl_py-1.2.0-py3-none-any.whl (123 kB)
Collecting mido==1.2.6
Using cached mido-1.2.6-py2.py3-none-any.whl (69 kB)
Collecting six==1.16.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting matplotlib==3.5.2
Using cached matplotlib-3.5.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (11.2 MB)
Collecting python-rtmidi==1.1.2
Using cached python-rtmidi-1.1.2.tar.gz (204 kB)
Preparing metadata (setup.py) ... done
Collecting wheel==0.37.1
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting scipy==1.7.3
Using cached scipy-1.7.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.8 MB)
Collecting tabulate>=0.7.5
Using cached tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting dm-tree>=0.1.1
Using cached dm_tree-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (153 kB)
Collecting wrapt>=1.11.1
Using cached wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (77 kB)
Collecting scikit-learn!=0.19.0,>=0.14.0
Using cached scikit_learn-1.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB)
Collecting soundfile>=0.9.0
Using cached soundfile-0.12.1-py2.py3-none-manylinux_2_31_x86_64.whl (1.2 MB)
Collecting resampy>=0.2.2
Using cached resampy-0.4.2-py3-none-any.whl (3.1 MB)
Collecting decorator>=3.0.0
Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting audioread>=2.0.0
Using cached audioread-3.0.0-py3-none-any.whl
Collecting joblib>=0.12
Using cached joblib-1.2.0-py3-none-any.whl (297 kB)
Collecting fonttools>=4.22.0
Using cached fonttools-4.38.0-py3-none-any.whl (965 kB)
Collecting pyparsing>=2.2.1
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting python-dateutil>=2.7
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting cycler>=0.10
Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting packaging>=20.0
Using cached packaging-23.0-py3-none-any.whl (42 kB)
Collecting kiwisolver>=1.0.1
Using cached kiwisolver-1.4.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)
Collecting future
Using cached future-0.18.3-py3-none-any.whl
Collecting bokeh>=0.12.0
Using cached bokeh-3.0.3-py3-none-any.whl (16.5 MB)
Collecting pydub
Using cached pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting pandas>=0.18.1
Using cached pandas-1.5.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting protobuf>=3.6.1
Using cached protobuf-4.21.12-cp37-abi3-manylinux2014_x86_64.whl (409 kB)
Collecting IPython
Using cached ipython-8.10.0-py3-none-any.whl (784 kB)
Collecting intervaltree>=2.1.0
Using cached intervaltree-3.1.0-py2.py3-none-any.whl
Collecting attrs
Using cached attrs-22.2.0-py3-none-any.whl (60 kB)
Collecting llvmlite<=0.33.0.dev0,>=0.31.0.dev0
Using cached llvmlite-0.32.1.tar.gz (104 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: setuptools in ./magenta-env/lib/python3.9/site-packages (from numba==0.49.1->magenta) (67.3.1)
Collecting networkx>=2.2
Using cached networkx-3.0-py3-none-any.whl (2.0 MB)
Collecting tifffile>=2019.7.26
Using cached tifffile-2023.2.3-py3-none-any.whl (215 kB)
Collecting PyWavelets>=1.1.1
Using cached PyWavelets-1.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.9 MB)
Collecting astunparse>=1.6.0
Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting grpcio<2.0,>=1.24.3
Using cached grpcio-1.51.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB)
Collecting flatbuffers<2,>=1.12
Using cached flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Collecting termcolor>=1.1.0
Using cached termcolor-2.2.0-py3-none-any.whl (6.6 kB)
Collecting tensorflow-io-gcs-filesystem>=0.23.1
Using cached tensorflow_io_gcs_filesystem-0.30.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.4 MB)
Collecting opt-einsum>=2.3.2
Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting gast<=0.4.0,>=0.2.1
Using cached gast-0.4.0-py3-none-any.whl (9.8 kB)
Collecting protobuf>=3.6.1
Using cached protobuf-3.19.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
Collecting keras<2.10.0,>=2.9.0rc0
Using cached keras-2.9.0-py2.py3-none-any.whl (1.6 MB)
Collecting h5py>=2.9.0
Using cached h5py-3.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB)
Collecting libclang>=13.0.0
Using cached libclang-15.0.6.1-py2.py3-none-manylinux2010_x86_64.whl (21.5 MB)
Collecting tensorboard<2.10,>=2.9
Using cached tensorboard-2.9.1-py3-none-any.whl (5.8 MB)
Collecting google-pasta>=0.1.1
Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Collecting keras-preprocessing>=1.1.1
Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Collecting typing-extensions>=3.6.6
Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting tensorflow-estimator<2.10.0,>=2.9.0rc0
Using cached tensorflow_estimator-2.9.0-py2.py3-none-any.whl (438 kB)
Collecting promise
Using cached promise-2.3-py3-none-any.whl
Collecting tqdm
Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting toml
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: requests>=2.19.0 in ./magenta-env/lib/python3.9/site-packages (from tensorflow-datasets==4.6.0->magenta) (2.28.2)
Collecting etils[epath]
Using cached etils-1.0.0-py3-none-any.whl (146 kB)
Collecting tensorflow-metadata
Using cached tensorflow_metadata-1.12.0-py3-none-any.whl (52 kB)
Collecting dill
Using cached dill-0.3.6-py3-none-any.whl (110 kB)
Collecting cloudpickle>=1.3
Using cached cloudpickle-2.2.1-py3-none-any.whl (25 kB)
Collecting contourpy>=1
Using cached contourpy-1.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (299 kB)
Collecting tornado>=5.1
Using cached tornado-6.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (423 kB)
Collecting PyYAML>=3.10
Using cached PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (661 kB)
Collecting Jinja2>=2.9
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting xyzservices>=2021.09.1
Using cached xyzservices-2022.9.0-py3-none-any.whl (55 kB)
Requirement already satisfied: sortedcontainers<3.0,>=2.0 in ./magenta-env/lib/python3.9/site-packages (from intervaltree>=2.1.0->note-seq==0.0.3->magenta) (2.4.0)
Requirement already satisfied: pytz>=2020.1 in ./magenta-env/lib/python3.9/site-packages (from pandas>=0.18.1->note-seq==0.0.3->magenta) (2022.7.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./magenta-env/lib/python3.9/site-packages (from requests>=2.19.0->tensorflow-datasets==4.6.0->magenta) (1.26.14)
Requirement already satisfied: idna<4,>=2.5 in ./magenta-env/lib/python3.9/site-packages (from requests>=2.19.0->tensorflow-datasets==4.6.0->magenta) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in ./magenta-env/lib/python3.9/site-packages (from requests>=2.19.0->tensorflow-datasets==4.6.0->magenta) (2022.12.7)
Requirement already satisfied: charset-normalizer<4,>=2 in ./magenta-env/lib/python3.9/site-packages (from requests>=2.19.0->tensorflow-datasets==4.6.0->magenta) (3.0.1)
Collecting resampy>=0.2.2
Using cached resampy-0.4.1-py3-none-any.whl (3.1 MB)
Using cached resampy-0.4.0-py3-none-any.whl (3.1 MB)
Using cached resampy-0.3.1-py3-none-any.whl (3.1 MB)
Collecting threadpoolctl>=2.0.0
Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting cffi>=1.0
Using cached cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
Collecting werkzeug>=1.0.1
Using cached Werkzeug-2.2.3-py3-none-any.whl (233 kB)
Collecting tensorboard-data-server<0.7.0,>=0.6.0
Using cached tensorboard_data_server-0.6.1-py3-none-manylinux2010_x86_64.whl (4.9 MB)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in ./magenta-env/lib/python3.9/site-packages (from tensorboard<2.10,>=2.9->tensorflow==2.9.1->magenta) (1.8.1)
Collecting google-auth-oauthlib<0.5,>=0.4.1
Using cached google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
Collecting markdown>=2.6.8
Using cached Markdown-3.4.1-py3-none-any.whl (93 kB)
Collecting google-auth<3,>=1.6.3
Using cached google_auth-2.16.0-py2.py3-none-any.whl (177 kB)
Collecting zipp
Using cached zipp-3.13.0-py3-none-any.whl (6.7 kB)
Collecting importlib_resources
Using cached importlib_resources-5.10.2-py3-none-any.whl (34 kB)
Collecting pickleshare
Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting pexpect>4.3
Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting pygments>=2.4.0
Using cached Pygments-2.14.0-py3-none-any.whl (1.1 MB)
Collecting jedi>=0.16
Using cached jedi-0.18.2-py2.py3-none-any.whl (1.6 MB)
Collecting traitlets>=5
Using cached traitlets-5.9.0-py3-none-any.whl (117 kB)
Collecting backcall
Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting stack-data
Using cached stack_data-0.6.2-py3-none-any.whl (24 kB)
Collecting matplotlib-inline
Using cached matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
Collecting prompt-toolkit<3.1.0,>=3.0.30
Using cached prompt_toolkit-3.0.36-py3-none-any.whl (386 kB)
Collecting googleapis-common-protos<2,>=1.52.0
Using cached googleapis_common_protos-1.58.0-py2.py3-none-any.whl (223 kB)
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting pyasn1-modules>=0.2.1
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting cachetools<6.0,>=2.0.0
Using cached cachetools-5.3.0-py3-none-any.whl (9.3 kB)
Collecting rsa<5,>=3.1.4
Using cached rsa-4.9-py3-none-any.whl (34 kB)
Collecting requests-oauthlib>=0.7.0
Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting parso<0.9.0,>=0.8.0
Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting importlib-metadata>=4.4
Using cached importlib_metadata-6.0.0-py3-none-any.whl (21 kB)
Collecting ptyprocess>=0.5
Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Requirement already satisfied: wcwidth in ./magenta-env/lib/python3.9/site-packages (from prompt-toolkit<3.1.0,>=3.0.30->IPython->note-seq==0.0.3->magenta) (0.2.6)
Collecting executing>=1.2.0
Using cached executing-1.2.0-py2.py3-none-any.whl (24 kB)
Collecting asttokens>=2.1.0
Using cached asttokens-2.2.1-py2.py3-none-any.whl (26 kB)
Collecting pure-eval
Using cached pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting pyasn1<0.5.0,>=0.4.6
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting oauthlib>=3.0.0
Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB)
Building wheels for collected packages: numba, python-rtmidi, llvmlite
Building wheel for numba (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-7q6d5_jn/numba_19579b4e070746019efb9534c4d03d80/setup.py", line 358, in <module>
metadata['ext_modules'] = get_ext_modules()
File "/tmp/pip-install-7q6d5_jn/numba_19579b4e070746019efb9534c4d03d80/setup.py", line 94, in get_ext_modules
import numpy.distutils.misc_util as np_misc
ModuleNotFoundError: No module named 'numpy'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numba
Running setup.py clean for numba
error: subprocess-exited-with-error
× python setup.py clean did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-7q6d5_jn/numba_19579b4e070746019efb9534c4d03d80/setup.py", line 358, in <module>
metadata['ext_modules'] = get_ext_modules()
File "/tmp/pip-install-7q6d5_jn/numba_19579b4e070746019efb9534c4d03d80/setup.py", line 94, in get_ext_modules
import numpy.distutils.misc_util as np_misc
ModuleNotFoundError: No module named 'numpy'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed cleaning build dir for numba
Building wheel for python-rtmidi (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-39
creating build/lib.linux-x86_64-cpython-39/rtmidi
copying rtmidi/__init__.py -> build/lib.linux-x86_64-cpython-39/rtmidi
copying rtmidi/midiconstants.py -> build/lib.linux-x86_64-cpython-39/rtmidi
copying rtmidi/release.py -> build/lib.linux-x86_64-cpython-39/rtmidi
copying rtmidi/midiutil.py -> build/lib.linux-x86_64-cpython-39/rtmidi
running build_ext
building 'rtmidi._rtmidi' extension
creating build/temp.linux-x86_64-cpython-39
creating build/temp.linux-x86_64-cpython-39/src
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -D__LINUX_ALSA__ -D__UNIX_JACK__ -Isrc -I/home/freqee/musicgen/magenta-env/include -I/usr/include/python3.9 -c src/RtMidi.cpp -o build/temp.linux-x86_64-cpython-39/src/RtMidi.o
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -D__LINUX_ALSA__ -D__UNIX_JACK__ -Isrc -I/home/freqee/musicgen/magenta-env/include -I/usr/include/python3.9 -c src/_rtmidi.cpp -o build/temp.linux-x86_64-cpython-39/src/_rtmidi.o
src/_rtmidi.cpp:39:10: fatal error: Python.h: No such file or directory
39 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-rtmidi
Running setup.py clean for python-rtmidi
Building wheel for llvmlite (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
running bdist_wheel
/home/freqee/musicgen/magenta-env/bin/python3.9 /tmp/pip-install-7q6d5_jn/llvmlite_ab54d98ef27b447d9da039e805997576/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-install-7q6d5_jn/llvmlite_ab54d98ef27b447d9da039e805997576/ffi/build.py", line 106, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
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-7q6d5_jn/llvmlite_ab54d98ef27b447d9da039e805997576/ffi/build.py", line 192, in <module>
main()
File "/tmp/pip-install-7q6d5_jn/llvmlite_ab54d98ef27b447d9da039e805997576/ffi/build.py", line 182, in main
main_posix('linux', '.so')
File "/tmp/pip-install-7q6d5_jn/llvmlite_ab54d98ef27b447d9da039e805997576/ffi/build.py", line 108, in main_posix
raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
error: command '/home/freqee/musicgen/magenta-env/bin/python3.9' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build numba python-rtmidi llvmlite
Installing collected packages: python-rtmidi, pygtrie, pydub, pyasn1, pure-eval, ptyprocess, pickleshare, mido, llvmlite, libclang, keras, flatbuffers, executing, dm-tree, backcall, zipp, xyzservices, wrapt, wheel, typing-extensions, traitlets, tqdm, tornado, toml, threadpoolctl, termcolor, tensorflow-io-gcs-filesystem, tensorflow-estimator, tensorboard-data-server, tabulate, six, rsa, PyYAML, pyparsing, pygments, pycparser, pyasn1-modules, protobuf, prompt-toolkit, Pillow, pexpect, parso, packaging, oauthlib, numpy, networkx, MarkupSafe, kiwisolver, joblib, intervaltree, grpcio, gast, future, fonttools, etils, dill, decorator, cycler, cloudpickle, cachetools, audioread, attrs, absl-py, werkzeug, tifffile, tf-slim, tensorflow-probability, sox, scipy, requests-oauthlib, PyWavelets, python-dateutil, promise, pretty-midi, opt-einsum, numba, matplotlib-inline, keras-preprocessing, Jinja2, jedi, importlib_resources, importlib-metadata, imageio, h5py, googleapis-common-protos, google-pasta, google-auth, dm-sonnet, contourpy, cffi, astunparse, asttokens, tensorflow-metadata, stack-data, soundfile, sk-video, scikit-learn, scikit-image, resampy, pandas, mir-eval, matplotlib, markdown, google-auth-oauthlib, tensorflow-datasets, tensorboard, librosa, IPython, bokeh, tensorflow, note-seq, magenta
Running setup.py install for python-rtmidi ... error
error: subprocess-exited-with-error
× Running setup.py install for python-rtmidi did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
running install
/home/freqee/musicgen/magenta-env/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-39
creating build/lib.linux-x86_64-cpython-39/rtmidi
copying rtmidi/__init__.py -> build/lib.linux-x86_64-cpython-39/rtmidi
copying rtmidi/midiconstants.py -> build/lib.linux-x86_64-cpython-39/rtmidi
copying rtmidi/release.py -> build/lib.linux-x86_64-cpython-39/rtmidi
copying rtmidi/midiutil.py -> build/lib.linux-x86_64-cpython-39/rtmidi
running build_ext
building 'rtmidi._rtmidi' extension
creating build/temp.linux-x86_64-cpython-39
creating build/temp.linux-x86_64-cpython-39/src
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -D__LINUX_ALSA__ -D__UNIX_JACK__ -Isrc -I/home/freqee/musicgen/magenta-env/include -I/usr/include/python3.9 -c src/RtMidi.cpp -o build/temp.linux-x86_64-cpython-39/src/RtMidi.o
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -D__LINUX_ALSA__ -D__UNIX_JACK__ -Isrc -I/home/freqee/musicgen/magenta-env/include -I/usr/include/python3.9 -c src/_rtmidi.cpp -o build/temp.linux-x86_64-cpython-39/src/_rtmidi.o
src/_rtmidi.cpp:39:10: fatal error: Python.h: No such file or directory
39 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> python-rtmidi
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
By the way, I am trying this in my 3.9 venv
You are missing dependencies apparently needed by magenta
(but not declared properly). Please ask for support for installing magenta
through their channels. This is not related to python-rtmidi
.
Really appreciate the advice and patience.
I am a beginner diving into the deep end of machine learning and I am attempting to install Magenta. I am SUPER excited to start playing with this.
- Successfully installed python-rtmidi:
- Successfully installed libasound2-dev
- Successfully installed libjack-jackd2-dev
- Problem Encountering errors when trying to install magenta. e.g. "ERROR: Failed building wheel for python-rtmidi", "ERROR: Failed building wheel for llvmlite", "ERROR: Failed building wheel for numba"
Log: 2023-02-15_magenta_log.txt
Any guidance would be greatly appreciated.
Thank you for your help!