Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support essentia install on macOS #1325

Open
dgoldenberg-audiomack opened this issue Apr 25, 2023 · 13 comments
Open

Support essentia install on macOS #1325

dgoldenberg-audiomack opened this issue Apr 25, 2023 · 13 comments
Labels

Comments

@dgoldenberg-audiomack
Copy link

There are a lot of tickets in this repo and the homebrew-essentia repo which report various issues with installing Essentia on macOS. I'd like to propose that this be done under a particular ticket like this one. This should work just like a *nix setup/install.

@regorxxx
Copy link

There are thousands of tickets about being impossible to build essentia (+gaia) on multiple systems and zero support... still waiting for a single answer to any of them.

With all due respect, I don't see the point of having constant updates when the repository and can not be built by most people since years and all instructions are outdated.

@dbogdanov
Copy link
Member

Python wheels for Apple Silicon are now available on PyPI (essentia, essentia-tensorflow).

@Dazzid
Copy link

Dazzid commented Nov 30, 2023

Hello,
I'm trying to run Essentia on Mac; I have done pip install essentia. But when importing essentia, the kernel crashes with Fatal Error and there is a message of missing SDL2. I have installed it using pip install PySDL2, but it still crashes for the same reason.
Any suggestion?

@dbogdanov
Copy link
Member

Hello, I'm trying to run Essentia on Mac; I have done pip install essentia. But when importing essentia, the kernel crashes with Fatal Error and there is a message of missing SDL2. I have installed it using pip install PySDL2, but it still crashes for the same reason. Any suggestion?

Can you provide more details about your system + Python installation?

@Dazzid
Copy link

Dazzid commented Dec 1, 2023

Certainly! I'm using a MacOS Ventura 13.0 M1 Chip.
Python 3.10.6 running in a conda env.

Some more info
Package                       Version
----------------------------- -------------
absl-py                       1.3.0
aiohttp                       3.8.3
aiosignal                     1.3.1
anyio                         3.6.2
appdirs                       1.4.4
appnope                       0.1.3
argon2-cffi                   21.3.0
argon2-cffi-bindings          21.2.0
asttokens                     2.1.0
astunparse                    1.6.3
async-timeout                 4.0.2
attrs                         22.1.0
audioread                     3.0.0
backcall                      0.2.0
backports.functools-lru-cache 1.6.4
beautifulsoup4                4.11.1
bleach                        1.5.0
blinker                       1.5
blobfile                      2.0.0
bokeh                         2.4.3
brotlipy                      0.7.0
bz2file                       0.98
cached-property               1.5.2
cachetools                    5.2.0
certifi                       2022.12.7
cffi                          1.15.1
chardet                       5.0.0
charset-normalizer            2.1.1
click                         8.1.3
cloudpickle                   2.2.0
contourpy                     1.0.6
cryptography                  38.0.3
cycler                        0.11.0
datasets                      2.8.0
debugpy                       1.6.3
decorator                     5.1.1
defusedxml                    0.7.1
dill                          0.3.6
docker-pycreds                0.4.0
dopamine-rl                   3.0.1
entrypoints                   0.4
essentia                      2.1b6.dev1110
essentia-tensorflow           2.1b6.dev1110
etils                         0.8.0
executing                     1.2.0
fastjsonschema                2.16.2
filelock                      3.8.0
Flask                         2.2.2
flatbuffers                   22.12.6
flit_core                     3.8.0
fonttools                     4.38.0
frozenlist                    1.3.3
fsspec                        2022.11.0
funcsigs                      1.0.2
future                        0.18.2
gast                          0.4.0
gdown                         4.5.1
gevent                        22.10.1
gin-config                    0.5.0
gitdb                         4.0.10
GitPython                     3.1.30
google-api-core               2.10.2
google-api-python-client      2.65.0
google-auth                   2.14.0
google-auth-httplib2          0.1.0
google-auth-oauthlib          0.4.6
google-pasta                  0.2.0
googleapis-common-protos      1.56.4
greenlet                      1.1.3.post0
grpcio                        1.47.1
gunicorn                      20.1.0
gym                           0.26.2
gym-notices                   0.0.8
h5py                          3.7.0
html5lib                      0.9999999
httplib2                      0.20.4
huggingface-hub               0.10.1
idna                          3.4
importlib-metadata            5.0.0
importlib-resources           5.10.0
intervaltree                  3.1.0
ipykernel                     6.17.1
ipython                       8.6.0
ipython-genutils              0.2.0
ipywidgets                    8.0.2
itsdangerous                  2.1.2
jax                           0.3.23
jaxlib                        0.3.22
jedi                          0.18.1
Jinja2                        3.1.2
joblib                        1.2.0
jsonpickle                    2.2.0
jsonschema                    4.17.0
jupyter                       1.0.0
jupyter_client                7.4.4
jupyter-console               6.4.4
jupyter_core                  5.0.0
jupyter-http-over-ws          0.0.8
jupyter-server                1.23.1
jupyterlab-pygments           0.2.2
jupyterlab-widgets            3.0.3
keras                         2.10.0
Keras-Preprocessing           1.1.2
kfac                          0.2.0
kiwisolver                    1.4.4
lazy_loader                   0.2
librosa                       0.10.0.post2
llvmlite                      0.39.1
lxml                          4.9.2
Markdown                      3.4.1
MarkupSafe                    2.1.1
matplotlib                    3.6.2
matplotlib-inline             0.1.6
mesh-tensorflow               0.1.21
mido                          1.2.10
mistune                       2.0.4
more-itertools                9.0.0
mpmath                        1.2.1
msgpack                       1.0.5
multidict                     6.0.2
multiprocess                  0.70.14
munkres                       1.1.4
music21                       8.1.0
musicnn                       0.1.0
nbclassic                     0.4.8
nbclient                      0.7.0
nbconvert                     7.2.4
nbformat                      5.7.0
nest-asyncio                  1.5.6
note-seq                      0.0.5
notebook                      6.5.2
notebook_shim                 0.2.2
numba                         0.56.3
numpy                         1.23.5
oauth2client                  4.1.3
oauthlib                      3.2.2
opencv-python                 4.6.0.66
opt-einsum                    3.3.0
packaging                     21.3
pandas                        1.5.0
pandocfilters                 1.5.0
parso                         0.8.3
pathtools                     0.1.2
pexpect                       4.8.0
pickleshare                   0.7.5
Pillow                        9.2.0
pip                           23.3.1
pkgutil_resolve_name          1.3.10
platformdirs                  2.5.2
pooch                         1.6.0
pretty-midi                   0.2.9
prometheus-client             0.15.0
promise                       2.3
prompt-toolkit                3.0.32
protobuf                      3.20.3
psutil                        5.9.4
ptyprocess                    0.7.0
pure-eval                     0.2.2
pyarrow                       10.0.1
pyasn1                        0.4.8
pyasn1-modules                0.2.7
pycparser                     2.21
pycryptodomex                 3.16.0
pydub                         0.25.1
pygame                        2.1.2
Pygments                      2.13.0
PyJWT                         2.6.0
pynndescent                   0.5.8
pyOpenSSL                     22.1.0
pyparsing                     3.0.9
pypng                         0.20220715.0
pyrsistent                    0.19.2
PySDL2                        0.9.16
pysdl2-dll                    2.28.4
PySocks                       1.7.1
python-dateutil               2.8.2
python-osc                    1.8.0
pytz                          2022.4
pyu2f                         0.1.5
PyYAML                        6.0
pyzmq                         19.0.2
qtconsole                     5.4.0
QtPy                          2.3.0
regex                         2022.9.13
requests                      2.28.1
requests-oauthlib             1.3.1
resampy                       0.4.2
responses                     0.18.0
rsa                           4.9
scikit-learn                  1.1.3
scipy                         1.9.2
seaborn                       0.12.0
Send2Trash                    1.8.0
sentry-sdk                    1.12.1
setproctitle                  1.3.2
setuptools                    65.5.1
shortuuid                     1.0.11
six                           1.16.0
sklearn                       0.0
smmap                         5.0.0
sniffio                       1.3.0
sortedcontainers              2.4.0
soundfile                     0.12.1
soupsieve                     2.3.2.post1
soxr                          0.3.5
stack-data                    0.6.0
sympy                         1.11.1
tensor2tensor                 1.15.7
tensorboard                   2.10.1
tensorboard-data-server       0.6.0
tensorboard-plugin-wit        1.8.1
tensorflow                    2.10.0
tensorflow-addons             0.18.0
tensorflow-datasets           4.7.0
tensorflow-estimator          2.10.0
tensorflow-gan                2.1.0
tensorflow-hub                0.12.0
tensorflow-metadata           1.10.0
tensorflow-probability        0.7.0
termcolor                     2.0.1
terminado                     0.17.0
tf-slim                       1.1.0
threadpoolctl                 2.2.0
tiktoken                      0.1.1
tinycss2                      1.2.1
tokenizers                    0.13.1
toml                          0.10.2
torch                         1.12.1
torch-scatter                 2.0.9
torchvision                   0.2.2
tornado                       6.2
tqdm                          4.64.1
traitlets                     5.5.0
transformers                  4.24.0.dev0
trax                          1.2.4
typeguard                     2.13.3
typing_extensions             4.4.0
umap-learn                    0.5.3
unicodedata2                  15.0.0
uritemplate                   4.1.1
urllib3                       1.26.11
Visual-MIDI                   1.1.0
wandb                         0.13.7
wcwidth                       0.2.5
webcolors                     1.12
webencodings                  0.5.1
websocket-client              1.4.2
Werkzeug                      2.2.2
wheel                         0.38.4
widgetsnbextension            4.0.3
wrapt                         1.14.1
xxhash                        3.2.0
yarl                          1.8.1
zipp                          3.10.0
zope.event                    4.5.0
zope.interface                5.5.0

@dhunstack
Copy link
Contributor

I get the exact same error message of missing SDL2. I had to manually set it up for Mac using this link-
https://github.com/libsdl-org/SDL/releases/download/release-2.28.5/SDL2-2.28.5.dmg

The latest official SDL2 release page is this: https://github.com/libsdl-org/SDL/releases/tag/release-2.28.5

@dbogdanov We should add the SDL2 binary or add pysdl2 as a dependency

@palonso
Copy link
Contributor

palonso commented Jan 26, 2024

thanks @dhunstack!

I could partially replicate the issue on my Mac M2 13.4 with Python 3.10 installed with brew.
In my case, SDL2 was available from brew since packages such as FFmpeg depend on it.
After brew uninstall --ignore-dependencies sdl2, Python gets stuck on import essentia instead of crashing, a behavior reported by other users before, and after reinstalling it essentia works fine again.

Additionally to the solution proposed by @dhunstack, brew users can just: brew install sdl2.

pip install PySDL2 is not expected to work since this is a wrapper package and doesn't expose the library symbols.

I agree that we should ad SDL2 as a dependency. Actually, it should be already available in our building environment since we brew install ffmpeg.

@jaycaston
Copy link

I'm having issues on Mac Ventura with an M1 as well... essential installed fine via pip but now anytime I attempt importing the library in python code it starts the python launcher, which freezes (requiring a force quit).

python version 3.10
essentia version 2.1b6.dev1110

@palonso
Copy link
Contributor

palonso commented Feb 26, 2024

our python wheels with sdl2 inside are not deployed yet. As a temporary solution, can you manually install it via brew (brew install sdl2) and let me know if the problem persists?

@jaycaston
Copy link

Thanks @palonso , just installed sdl2 via pip install PySDL2 and I'm still running into the same issue whereby Python Launcher opens and freezes upon import of essentia.

@palonso
Copy link
Contributor

palonso commented Feb 26, 2024

thanks @dhunstack!

I could partially replicate the issue on my Mac M2 13.4 with Python 3.10 installed with brew. In my case, SDL2 was available from brew since packages such as FFmpeg depend on it. After brew uninstall --ignore-dependencies sdl2, Python gets stuck on import essentia instead of crashing, a behavior reported by other users before, and after reinstalling it essentia works fine again.

Additionally to the solution proposed by @dhunstack, brew users can just: brew install sdl2.

pip install PySDL2 is not expected to work since this is a wrapper package and doesn't expose the library symbols.

I agree that we should ad SDL2 as a dependency. Actually, it should be already available in our building environment since we brew install ffmpeg.

As I mentioned above pip install PySDL2 is not expected to work. You can use brew or manually install it.

@jaycaston
Copy link

thanks, that worked!

@DrBrule
Copy link

DrBrule commented Mar 29, 2024

I get the exact same error message of missing SDL2. I had to manually set it up for Mac using this link- https://github.com/libsdl-org/SDL/releases/download/release-2.28.5/SDL2-2.28.5.dmg

The latest official SDL2 release page is this: https://github.com/libsdl-org/SDL/releases/tag/release-2.28.5

@dbogdanov We should add the SDL2 binary or add pysdl2 as a dependency

This solution worked for me, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants