MusicLang / musiclang_predict

AI Prediction api of the MusicLang package
GNU General Public License v3.0
250 stars 16 forks source link

/musiclang_predict/musiclang_predict/c/librun.so: cannot open shared object file: No such file or directory #28

Closed haha-lisa closed 2 months ago

haha-lisa commented 3 months ago

OSError Traceback (most recent call last) Cell In [2], line 1 ----> 1 from musiclang_predict import MusicLangPredictor 3 # Control the chord progression 4 # Chord qualities available : M, m, 7, m7b5, sus2, sus4, m7, M7, dim, dim0. 5 # You can also specify the bass if it belongs to the chord (eg : Bm/D) 6 chord_progression = "Am CM Dm E7 Am" # 1 chord = 1 bar

File ~/2024/202404/musiclang_predict/musiclang_predict/init.py:2 1 from .tokenizers import MusicLangTokenizer, midi_file_to_template, score_to_template, MusicLangBPETokenizer ----> 2 from .predict import MusicLangPredictor 4 all = [ 5 'MusicLangTokenizer', 'predict', 'midi_file_to_template', 'score_to_template', 6 'MusicLangBPETokenizer', 'MusicLangPredictor' 7 ]

File ~/2024/202404/musiclang_predict/musiclang_predict/predict.py:4 1 from musiclang import Score 2 from musiclang.library import * ----> 4 from musiclang_predict.chelpers import run_for_n_bars, run_transformer_model, create_transformer, free_transformer_external 5 import os 6 import huggingface_hub

File ~/2024/202404/musiclang_predict/musiclang_predict/chelpers.py:14 ... --> 382 self._handle = _dlopen(self._name, mode) 383 else: 384 self._handle = handle

floriangardin commented 3 months ago

If you cloned it, you need to run the setup to compile the c library : pip install . If you pip installed it and it failed, it's probably because you don't have gcc to compile the c library. you can check the makefile

haha-lisa commented 2 months ago

I have solved it. Thanks for your answer!