Music Computation and Complexity
I get this error during pip install musicntwrk
...
Collecting ruptures (from musicntwrk)
Using cached ruptures-1.1.9.tar.gz (308 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [70 lines of output]
Compiling src/ruptures/detection/_detection/ekcpd.pyx because it changed.
Compiling src/ruptures/utils/_utils/convert_path_matrix.pyx because it changed.
[1/2] Cythonizing src/ruptures/detection/_detection/ekcpd.pyx
[2/2] Cythonizing src/ruptures/utils/_utils/convert_path_matrix.pyx
/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: BSD License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/version_inference.py:51: UserWarning: version of ruptures already set
warnings.warn(self.message)
Traceback (most recent call last):
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/config/expand.py", line 71, in __getattr__
return next(
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/config/expand.py", line 185, in read_attr
value = getattr(StaticModule(module_name, spec), attr_name)
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/config/expand.py", line 77, in __getattr__
raise AttributeError(f"{self.name} has no attribute {attr}") from e
AttributeError: ruptures has no attribute __version__
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/anaconda3/envs/complexp/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in
main()
File "/opt/anaconda3/envs/complexp/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
File "/opt/anaconda3/envs/complexp/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
self.run_setup()
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 317, in run_setup
exec(code, locals())
File "", line 26, in
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 115, in setup
return distutils.core.setup(**attrs)
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 160, in setup
dist.parse_config_files()
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 752, in parse_config_files
setupcfg.parse_configuration(
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py", line 188, in parse_configuration
meta.parse()
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py", line 502, in parse
section_parser_method(section_options)
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py", line 477, in parse_section
self[name] = value
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py", line 294, in __setitem__
parsed = self.parsers.get(option_name, lambda x: x)(value)
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py", line 600, in _parse_version
return expand.version(self._parse_attr(value, self.package_dir, self.root_dir))
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py", line 419, in _parse_attr
return expand.read_attr(attr_desc, package_dir, root_dir)
File "/private/var/folders/t3/s54nks592tn12y2g3t49nxxc0000gn/T/pip-build-env-jwk8kyta/overlay/lib/python3.10/site-packages/setuptools/config/expand.py", line 191, in read_attr
return getattr(module, attr_name)
AttributeError: module 'ruptures' has no attribute '__version__'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.note: This error originates from a subprocess, and is likely not a problem with pip.
Hi,
did anyone get the notebook running on Windows 11?
When executing the displayNotes command I get the error message:
SubConverterException: Cannot find a path to the 'mscore' file at C:\Users\steph\Documents\Repositories\complexmusic\C:\Program Files\MuseScore 3\bin\MuseScore3.exe -- download MuseScore
I cannot find the file music21rc.txt anywhere in my file system. Is it called differently on Windows?
Any help would be appreciated
Stephan
Hi again,
I found the solution by myself. The key is the file C:\User\\AppData\Roaming\music21-settings.xml. There you can adapt the directory to your MuseScore executable. Be careful there are two entries musescoreDirectPNGPath and musicxmlPath. The both should point to your MuseScore executable.
In case the file does not exist you can create one with python -m music21.configure
Hope this helps
Stephan
Thank you!!! I worked on this for hours and all I needed to do was ignore the instructions in the tutorial video, find the xml file, and change one line. I almost gave up on this because the instructions don't account for anyone who's not on a Mac.!
In the tutorial video for installation it showed to install the 5 files inside the downloaded notebook, but I can't install "pip install musicntwrk". whenever I try, it shows a error:
[WinError 2] The system cannot find the file specified
When you call the transition matrix T with the index '-1' it is suppose to point to the probabilities for Heads, but I think it continues to point to probabilities for Tails. I am learning Python as i'm going over tutorial, so maybe i'm missing something. Or, maybe this is an intended error to figure out for the exercise. Thanks for any feedback.
Hi,
I encountered an issue during the installation tutorial of the musicntwrk library. I downloaded all suggested packages in the install.txt file, but then I get an issue when I try "import pyo" in the Python interactive shell. It seems the reason is because I have an M2 MacBook, which runs on ARM64, while pyo might only be available for x86_64? How do I resolve this issue?I followed the instructions below and successfully ran import pyo https://belangeo.github.io/pyo/compiling.html
Thanks! But I actually managed by making sure the environment runs in x86_64. Do you know if you're running on ARM64? If so, I'll consider your approach.
Yes, I'm running it on M1 Macbook
Hi, sorry about your problem. I can confirm that I have installed successfully on M1, M2 and M3 (the video I made for the instructions was on a M2 Mac).
when i tried to install from source everything went fine but it didn't show up in pip list. i then just used pip install pyo and it worked fine but this does not work s = pyo.Server(nchnls=nch,ichnls=ich).boot() Pyo warning: Portmidi warning: no midi device found!
Portmidi closed.when i tried to install from source everything went fine but it didn't show up in pip list. i then just used pip install pyo and it worked fine but this does not work s = pyo.Server(nchnls=nch,ichnls=ich).boot() Pyo warning: Portmidi warning: no midi device found!
Portmidi closed.here is the code i nmeed following the pyo web site
git clone https://github.com/belangeo/pyo.gitpython -m build --config-setting="--build-option=--use-coreaudio" --config-setting="--build-option=--use-double" --config-setting="build-option=--use-jack"
installed fine but didn;t show in pip list.
portmidi in not needed for pyo to play sunds, so the installation should work fine. Did you manage to get a sound out?
You can try this code:s = pyo.Server(nchnls=nch,ichnls=ich).boot()
s.start()
a = pyo.Sine(440,mul=0.5)
a.out()
time.sleep(2)
a.stop()If you hear a sine wave all is good.
That worked! What is confusing about pyo is it got installed with pip install musicntwrk but later in the video you say that you need pyo with jack which implied you had to reinstall it
well, it depends on which system you are running... Linux needs Jack, Mac or Windows do not. Glad it worked!
I am installing anaconda python on windows 10. pyo did not get built because for some reason build_ext is not in the path - and there are two different versions of it. That will need some research. My criticism of the lesson is that there should have been text to go along with it as many important comments are not in the INSTALL file and the video resolution is sometimes fuzzy. I hope to get there in the end.
Thanks for the suggestion. And sorry that you are having problems. As I mentioned, I do not use or even own a windows computer, but other students (in this course and in my own institution) have been successful. If you cannot figure it out, I might be able to put you in contact with somebody here at the University of North Texas.
Marco Buongiorno Nardelli - thank you for the reply. I will let you know. As the course has no specific schedule it's good for me to work it out if possible. I'm not in any rush.
Let me know when you fix it. This is going to be important information for others ;-)!
Dear Marco Buongiorno Nardelli - It was trivial when I really got round to thinking about it after a fallow week on this topic. I installed python version 3.12.7. There is an error in your INSTALL file but I did "conda create --name compmus python=3.12.7" (for some reason you have "conda create --name complexp "). I realise now that all the needed bits may not be tagged for that version so I redid it all with "conda create --name compmus python=3.10.11" and all went well. I did use python until 12 years ago and this refresh on anaconda that I have never used has been useful as I am now familiar with commands. I can get on to the music bits soon :-) Best wishes.
Subforums
- Introduce Yourself
- Class Announcements
- Study Groups and Meetups
- Technical Issues
- General Discussion
- Course Feedback
- Course Materials to Share
- A Visual Approach to Nonlinear Dynamics
- Functions and Iterations
- Introduction to Differential Equations
- Ordinary Differential Equations
- Maximum Entropy Methods
- Random Walks
- Introduction to Information Theory
- Vector and Matrix Algebra
- Introduction to Renormalization
- Game Theory I • Static Games
- Game Theory II • Dynamic Games
- Fundamentals of Machine Learning
- Introduction to Computation Theory
- Fundamentals of NetLogo
- Lecture: Pandemics
- Lecture: Artificial Intelligence
- Lecture: Crime and Punishment
- Complexity-GAINs Curriculum
- Introduction to Open Science
- Journal Club
- IN DEVELOPMENT: Multicellularity Modules
- UCR Application Tutorial
- Lecture: What is Complexity?
- Agent-Based Models with Python: An Introduction to Mesa
- Lecture: Epistemological emergence
- A Visual Approach to Nonlinear Dynamics
- Music Computation and Complexity