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

Appropriate module versions for nussl? #239

Open
dlaplagne opened this issue Sep 4, 2023 · 3 comments
Open

Appropriate module versions for nussl? #239

dlaplagne opened this issue Sep 4, 2023 · 3 comments
Labels

Comments

@dlaplagne
Copy link

Hi everybody. First of all, thanks for building nussl and making it available!

I am having trouble setting up a running environment. It seems I end up getting current versions of some modules that raise incompatibilities with the nussl code.
I was thinking maybe someone can please share a list of modules from a working environment for me to force install working versions of all?

For installation, I have tried:
conda create -n nussl pip
pip install nussl

Importing nussle raises:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\Diego\miniconda3\envs\nussl\Lib\site-packages\nussl\__init__.py", line 24, in <module> from .core import AudioSignal, STFTParams File "C:\Users\Diego\miniconda3\envs\nussl\Lib\site-packages\nussl\core\__init__.py", line 65, in <module> from . import play_utils File "C:\Users\Diego\miniconda3\envs\nussl\Lib\site-packages\nussl\core\play_utils.py", line 16, in <module> multitrack_template = pkg_resources.read_text(templates, 'multitrack.html') ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'importlib_resources' has no attribute 'read_text'

Commenting that line out, I still get errors from numpy, like:

File "C:\Users\Diego\miniconda3\envs\nussl\Lib\site-packages\nussl\core\masks\binary_mask.py", line 90, in _validate_mask if mask_.dtype == np.bool:
File "C:\Users\Diego\miniconda3\envs\nussl\Lib\site-packages\numpy\__init__.py", line 305, in __getattr__ raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'bool'.

Here's my current list of installed modules:

Name Version Build Channel
absl-py 1.4.0 pypi_0 pypi
asciitree 0.3.3 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
audioread 3.0.0 pypi_0 pypi
bzip2 1.0.8 he774522_0
ca-certificates 2023.05.30 haa95532_0
cachetools 5.3.1 pypi_0 pypi
certifi 2023.7.22 pypi_0 pypi
cffi 1.15.1 pypi_0 pypi
charset-normalizer 3.2.0 pypi_0 pypi
colorama 0.4.6 pypi_0 pypi
contourpy 1.1.0 pypi_0 pypi
cycler 0.11.0 pypi_0 pypi
decorator 5.1.1 pypi_0 pypi
entrypoints 0.4 pypi_0 pypi
fasteners 0.18 pypi_0 pypi
ffmpeg-python 0.2.0 pypi_0 pypi
ffmpy 0.3.1 pypi_0 pypi
filelock 3.12.3 pypi_0 pypi
fonttools 4.42.1 pypi_0 pypi
future 0.18.3 pypi_0 pypi
google-auth 2.22.0 pypi_0 pypi
google-auth-oauthlib 1.0.0 pypi_0 pypi
gpytorch 1.11 pypi_0 pypi
grpcio 1.57.0 pypi_0 pypi
idna 3.4 pypi_0 pypi
importlib-resources 6.0.1 pypi_0 pypi
jams 0.3.4 pypi_0 pypi
jaxtyping 0.2.21 pypi_0 pypi
jinja2 3.1.2 pypi_0 pypi
joblib 1.3.2 pypi_0 pypi
jsonschema 4.19.0 pypi_0 pypi
jsonschema-specifications 2023.7.1 pypi_0 pypi
kiwisolver 1.4.5 pypi_0 pypi
lazy-loader 0.3 pypi_0 pypi
libffi 3.4.4 hd77b12b_0
librosa 0.10.1 pypi_0 pypi
linear-operator 0.5.2 pypi_0 pypi
llvmlite 0.40.1 pypi_0 pypi
markdown 3.4.4 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
matplotlib 3.7.2 pypi_0 pypi
mir-eval 0.7 pypi_0 pypi
mpmath 1.3.0 pypi_0 pypi
msgpack 1.0.5 pypi_0 pypi
musdb 0.4.0 pypi_0 pypi
museval 0.4.1 pypi_0 pypi
networkx 3.1 pypi_0 pypi
norbert 0.2.1 pypi_0 pypi
numba 0.57.1 pypi_0 pypi
numcodecs 0.11.0 pypi_0 pypi
numpy 1.24.4 pypi_0 pypi
nussl 1.1.9 pypi_0 pypi
oauthlib 3.2.2 pypi_0 pypi
openssl 3.0.10 h2bbff1b_2
packaging 23.1 pypi_0 pypi
pandas 2.1.0 pypi_0 pypi
pillow 10.0.0 pypi_0 pypi
pip 23.2.1 py311haa95532_0
platformdirs 3.10.0 pypi_0 pypi
pooch 1.7.0 pypi_0 pypi
protobuf 4.24.2 pypi_0 pypi
pyaml 23.9.1 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pycparser 2.21 pypi_0 pypi
pyloudnorm 0.1.1 pypi_0 pypi
pyparsing 3.0.9 pypi_0 pypi
python 3.11.4 he1021f5_0
python-dateutil 2.8.2 pypi_0 pypi
pytorch-ignite 0.4.12 pypi_0 pypi
pytz 2023.3 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
referencing 0.30.2 pypi_0 pypi
requests 2.31.0 pypi_0 pypi
requests-oauthlib 1.3.1 pypi_0 pypi
rpds-py 0.10.0 pypi_0 pypi
rsa 4.9 pypi_0 pypi
scikit-learn 1.3.0 pypi_0 pypi
scipy 1.11.2 pypi_0 pypi
setuptools 68.0.0 py311haa95532_0
simplejson 3.19.1 pypi_0 pypi
six 1.16.0 pypi_0 pypi
sortedcontainers 2.4.0 pypi_0 pypi
soundfile 0.12.1 pypi_0 pypi
sox 1.4.1 pypi_0 pypi
soxr 0.3.6 pypi_0 pypi
sqlite 3.41.2 h2bbff1b_0
stempeg 0.2.3 pypi_0 pypi
sympy 1.12 pypi_0 pypi
tensorboard 2.14.0 pypi_0 pypi
tensorboard-data-server 0.7.1 pypi_0 pypi
termtables 0.2.4 pypi_0 pypi
threadpoolctl 3.2.0 pypi_0 pypi
tk 8.6.12 h2bbff1b_0
torch 2.0.1 pypi_0 pypi
tqdm 4.66.1 pypi_0 pypi
typeguard 2.13.3 pypi_0 pypi
typing-extensions 4.7.1 pypi_0 pypi
tzdata 2023.3 pypi_0 pypi
urllib3 1.26.16 pypi_0 pypi
vc 14.2 h21ff451_1
vs2015_runtime 14.27.29016 h5e58377_2
werkzeug 2.3.7 pypi_0 pypi
wheel 0.38.4 py311haa95532_0
xz 5.4.2 h8cc25b3_0
zarr 2.16.1 pypi_0 pypi
zlib 1.2.13 h8cc25b3_0

thanksss

@andrei-radu
Copy link

Hi, I also tried this library and got the same errors.
Here is my workaround:

  • For the first error, in the nussl > core > play_utils.py file: changed line 11 from import importlib_resources as pkg_resources to import importlib.resources as pkg_resources

  • For the second one, in the nuss > core > masks > binary_mask.py: changed line 90 from if mask_.dtype == np.bool: to if mask_.dtype == bool:

Hopes this helps.

@dlaplagne
Copy link
Author

Ah thanks Andrei. I thought it would take too many edits to make it work and gave up. With those two you suggested it is working so far.
I have already made a further one:
From librosa.display.waveplot(data, sr=audio_signal.sample_rate, x_axis=x_axis, **kwargs) to librosa.display.waveshow(data, sr=audio_signal.sample_rate, axis=x_axis, **kwargs) in utils.py, line 449, for compatibility with librosa 0.10.1

@andrei-radu
Copy link

Ah thanks Andrei. I thought it would take too many edits to make it work and gave up. With those two you suggested it is working so far. I have already made a further one: From librosa.display.waveplot(data, sr=audio_signal.sample_rate, x_axis=x_axis, **kwargs) to librosa.display.waveshow(data, sr=audio_signal.sample_rate, axis=x_axis, **kwargs) in utils.py, line 449, for compatibility with librosa 0.10.1

I added a PR to solve this. If you find more changes (I expect them since librosa changed a lot lately) feel free to push them.

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

2 participants