polymath icon indicating copy to clipboard operation
polymath copied to clipboard

libtorch_cuda_cpp.so not found

Open fatualux opened this issue 2 years ago • 1 comments

Good morning, this is the first issue I open on GitHub, so please be patient :)

I am on Arch Linux (6.1.12-arch1-1 x86_64). I installed polymath through pip install.

My pip version is pip 23.0.1 from /usr/lib/python3.10/site-packages/pip (python 3.10).

I encountered this problem.

OSError: libtorch_cuda_cpp.so: cannot open shared object file: No such file or directory

My notebook is an MSI GE65 Raider 9SE and PyTorch uses my NVidia 2060 GPU.

Here is the command I gave and the output I received:

[fz@FZPC polymath]$ python polymath.py -a library/1.wav
---------------------------------------------------------------------------- 
--------------------------------- POLYMATH --------------------------------- 
---------------------------------------------------------------------------- 
No Database file found: library/database.p
add video: library/1.wav to videos: 0
add wav or mp3 file
------ process audio library/1.wav
Finished procesing files: 1
------------------------------ Files in DB: 1 ------------------------------
is audio 1_a4e3843739c26f461790d53394bfe77c00b26ea297a1328968b00b611ce09902 1 /home/fz/Documents/github/polymath/library/1_a4e3843739c26f461790d53394bfe77c00b26ea297a1328968b00b611ce09902.wav
------------------------------ get_audio_features: 1_a4e3843739c26f461790d53394bfe77c00b26ea297a1328968b00b611ce09902 ------------------------------
1/8 segementation
 > 0
 > 1
 > 2
 > 3
 > 4
 > 5
 > 6
 > 7
 > 8
 > 9
 > 10
 > 11
 > 12
 > 13
 > 14
 > 15
 > 16
 > 17
 > 18
 > 19
 > 20
 > 21
 > 22
 > 23
2/8 pitch tracking
2023-02-26 20:55:17.954140: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-02-26 20:55:17.988489: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-02-26 20:55:17.988907: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-02-26 20:55:17.989552: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-02-26 20:55:17.991506: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-02-26 20:55:17.992071: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-02-26 20:55:17.992463: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-02-26 20:55:18.799081: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-02-26 20:55:18.799450: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-02-26 20:55:18.799736: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-02-26 20:55:18.799898: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 4623 MB memory:  -> device: 0, name: NVIDIA GeForce RTX 2060, pci bus id: 0000:01:00.0, compute capability: 7.5
2023-02-26 20:55:28.007107: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384] Loaded cuDNN version 8600
688/688 [==============================] - 8s 7ms/step
3/8 load sample
4/8 sample separation
5/8 beat tracking
6/8 feature extraction
/home/fz/.local/lib/python3.10/site-packages/librosa/util/decorators.py:88: UserWarning: power_to_db was called on complex input so phase information will be discarded. To suppress this warning, call power_to_db(np.abs(D)**2) instead.
  return f(*args, **kwargs)
/home/fz/Documents/github/polymath/polymath.py:302: FutureWarning: Pass y=[0. 0. 0. ... 0. 0. 0.] as keyword args. From version 0.10 passing these as positional arguments will result in an error
  S = librosa.feature.melspectrogram(y, sr=sr, n_mels=128)
7/8 feature aggregation
8/8 split stems
Traceback (most recent call last):
  File "/home/fz/.local/bin/demucs", line 5, in <module>
    from demucs.separate import main
  File "/home/fz/.local/lib/python3.10/site-packages/demucs/separate.py", line 14, in <module>
    import torchaudio as ta
  File "/home/fz/.local/lib/python3.10/site-packages/torchaudio/__init__.py", line 1, in <module>
    from torchaudio import (  # noqa: F401
  File "/home/fz/.local/lib/python3.10/site-packages/torchaudio/_extension.py", line 135, in <module>
    _init_extension()
  File "/home/fz/.local/lib/python3.10/site-packages/torchaudio/_extension.py", line 105, in _init_extension
    _load_lib("libtorchaudio")
  File "/home/fz/.local/lib/python3.10/site-packages/torchaudio/_extension.py", line 52, in _load_lib
    torch.ops.load_library(path)
  File "/usr/lib/python3.10/site-packages/torch/_ops.py", line 573, in load_library
    ctypes.CDLL(path)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libtorch_cuda_cpp.so: cannot open shared object file: No such file or directory
1_a4e3843739c26f461790d53394bfe77c00b26ea297a1328968b00b611ce09902 tempo 172.27 duration 220.15 timbre -7.37 pitch 0.5 intensity -40.34 segments 25 frequency 395.55 key G4 name 1

thanks in advance for your help

fatualux avatar Feb 26 '23 20:02 fatualux

[fz@FZPC ~]$ python --version Python 3.10.9

In the README.md I read that the python version required must be below 3.10... could it be the problem?

Dependencies required are satisfied.


[fz@FZPC ~]$ pip install git+https://github.com/spotify/basic-pitch.git
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/spotify/basic-pitch.git
  Cloning https://github.com/spotify/basic-pitch.git to /tmp/pip-req-build-x1e6t1eo
  Running command git clone --filter=blob:none --quiet https://github.com/spotify/basic-pitch.git /tmp/pip-req-build-x1e6t1eo
  Resolved https://github.com/spotify/basic-pitch.git to commit ad9ab8a65d18a1cb06dee25f45855acc4598a10a
  Preparing metadata (setup.py) ... done
Requirement already satisfied: librosa>=0.8.0 in ./.local/lib/python3.10/site-packages (from basic-pitch==0.2.0) (0.9.2)
Requirement already satisfied: mir_eval>=0.6 in ./.local/lib/python3.10/site-packages (from basic-pitch==0.2.0) (0.7)
Requirement already satisfied: numpy<1.24,>=1.18 in ./.local/lib/python3.10/site-packages (from basic-pitch==0.2.0) (1.23.5)
Requirement already satisfied: pretty_midi>=0.2.9 in ./.local/lib/python3.10/site-packages (from basic-pitch==0.2.0) (0.2.9)
Requirement already satisfied: resampy>=0.2.2 in ./.local/lib/python3.10/site-packages (from basic-pitch==0.2.0) (0.2.2)
Requirement already satisfied: scipy>=1.4.1 in ./.local/lib/python3.10/site-packages (from basic-pitch==0.2.0) (1.9.3)
Requirement already satisfied: typing_extensions in ./.local/lib/python3.10/site-packages (from basic-pitch==0.2.0) (4.4.0)
Requirement already satisfied: tensorflow<2.10,>=2.4.1 in ./.local/lib/python3.10/site-packages (from basic-pitch==0.2.0) (2.9.0)
Requirement already satisfied: audioread>=2.1.9 in ./.local/lib/python3.10/site-packages (from librosa>=0.8.0->basic-pitch==0.2.0) (3.0.0)
Requirement already satisfied: soundfile>=0.10.2 in ./.local/lib/python3.10/site-packages (from librosa>=0.8.0->basic-pitch==0.2.0) (0.11.0)
Requirement already satisfied: scikit-learn>=0.19.1 in ./.local/lib/python3.10/site-packages (from librosa>=0.8.0->basic-pitch==0.2.0) (1.2.0)
Requirement already satisfied: pooch>=1.0 in ./.local/lib/python3.10/site-packages (from librosa>=0.8.0->basic-pitch==0.2.0) (1.6.0)
Requirement already satisfied: joblib>=0.14 in ./.local/lib/python3.10/site-packages (from librosa>=0.8.0->basic-pitch==0.2.0) (1.2.0)
Requirement already satisfied: packaging>=20.0 in /usr/lib/python3.10/site-packages (from librosa>=0.8.0->basic-pitch==0.2.0) (23.0)
Requirement already satisfied: numba>=0.45.1 in ./.local/lib/python3.10/site-packages (from librosa>=0.8.0->basic-pitch==0.2.0) (0.56.4)
Requirement already satisfied: decorator>=4.0.10 in ./.local/lib/python3.10/site-packages (from librosa>=0.8.0->basic-pitch==0.2.0) (5.1.1)
Requirement already satisfied: six in ./.local/lib/python3.10/site-packages (from mir_eval>=0.6->basic-pitch==0.2.0) (1.16.0)
Requirement already satisfied: future in ./.local/lib/python3.10/site-packages (from mir_eval>=0.6->basic-pitch==0.2.0) (0.18.2)
Requirement already satisfied: mido>=1.1.16 in ./.local/lib/python3.10/site-packages (from pretty_midi>=0.2.9->basic-pitch==0.2.0) (1.2.10)
Requirement already satisfied: protobuf>=3.9.2 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (3.19.6)
Requirement already satisfied: grpcio<2.0,>=1.24.3 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (1.51.1)
Requirement already satisfied: tensorboard<2.10,>=2.9 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (2.9.1)
Requirement already satisfied: gast<=0.4.0,>=0.2.1 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (0.4.0)
Requirement already satisfied: wrapt>=1.11.0 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (1.14.1)
Requirement already satisfied: absl-py>=1.0.0 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (1.3.0)
Requirement already satisfied: termcolor>=1.1.0 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (2.1.1)
Requirement already satisfied: flatbuffers<2,>=1.12 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (1.12)
Requirement already satisfied: astunparse>=1.6.0 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (1.6.3)
Requirement already satisfied: keras<2.10.0,>=2.9.0rc0 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (2.9.0)
Requirement already satisfied: libclang>=13.0.0 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (14.0.6)
Requirement already satisfied: google-pasta>=0.1.1 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (0.2.0)
Requirement already satisfied: h5py>=2.9.0 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (3.7.0)
Requirement already satisfied: setuptools in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (65.6.3)
Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (0.29.0)
Requirement already satisfied: keras-preprocessing>=1.1.1 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (1.1.2)
Requirement already satisfied: tensorflow-estimator<2.10.0,>=2.9.0rc0 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (2.9.0)
Requirement already satisfied: opt-einsum>=2.3.2 in ./.local/lib/python3.10/site-packages (from tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (3.3.0)
Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/lib/python3.10/site-packages (from astunparse>=1.6.0->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (0.38.4)
Requirement already satisfied: llvmlite<0.40,>=0.39.0dev0 in ./.local/lib/python3.10/site-packages (from numba>=0.45.1->librosa>=0.8.0->basic-pitch==0.2.0) (0.39.1)
Requirement already satisfied: requests>=2.19.0 in ./.local/lib/python3.10/site-packages (from pooch>=1.0->librosa>=0.8.0->basic-pitch==0.2.0) (2.28.1)
Requirement already satisfied: appdirs>=1.3.0 in ./.local/lib/python3.10/site-packages (from pooch>=1.0->librosa>=0.8.0->basic-pitch==0.2.0) (1.4.4)
Requirement already satisfied: threadpoolctl>=2.0.0 in ./.local/lib/python3.10/site-packages (from scikit-learn>=0.19.1->librosa>=0.8.0->basic-pitch==0.2.0) (3.1.0)
Requirement already satisfied: cffi>=1.0 in /usr/lib/python3.10/site-packages (from soundfile>=0.10.2->librosa>=0.8.0->basic-pitch==0.2.0) (1.15.1)
Requirement already satisfied: google-auth<3,>=1.6.3 in ./.local/lib/python3.10/site-packages (from tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (2.15.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in ./.local/lib/python3.10/site-packages (from tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (0.4.6)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in ./.local/lib/python3.10/site-packages (from tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (1.8.1)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in ./.local/lib/python3.10/site-packages (from tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (0.6.1)
Requirement already satisfied: werkzeug>=1.0.1 in ./.local/lib/python3.10/site-packages (from tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (2.2.2)
Requirement already satisfied: markdown>=2.6.8 in ./.local/lib/python3.10/site-packages (from tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (3.4.1)
Requirement already satisfied: pycparser in /usr/lib/python3.10/site-packages (from cffi>=1.0->soundfile>=0.10.2->librosa>=0.8.0->basic-pitch==0.2.0) (2.21)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in ./.local/lib/python3.10/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (5.2.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in ./.local/lib/python3.10/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4 in ./.local/lib/python3.10/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (4.9)
Requirement already satisfied: requests-oauthlib>=0.7.0 in ./.local/lib/python3.10/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (1.3.1)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.10/site-packages (from requests>=2.19.0->pooch>=1.0->librosa>=0.8.0->basic-pitch==0.2.0) (2022.12.7)
Requirement already satisfied: idna<4,>=2.5 in ./.local/lib/python3.10/site-packages (from requests>=2.19.0->pooch>=1.0->librosa>=0.8.0->basic-pitch==0.2.0) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./.local/lib/python3.10/site-packages (from requests>=2.19.0->pooch>=1.0->librosa>=0.8.0->basic-pitch==0.2.0) (1.26.13)
Requirement already satisfied: charset-normalizer<3,>=2 in ./.local/lib/python3.10/site-packages (from requests>=2.19.0->pooch>=1.0->librosa>=0.8.0->basic-pitch==0.2.0) (2.1.1)
Requirement already satisfied: MarkupSafe>=2.1.1 in ./.local/lib/python3.10/site-packages (from werkzeug>=1.0.1->tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (2.1.1)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in ./.local/lib/python3.10/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in ./.local/lib/python3.10/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.10,>=2.9->tensorflow<2.10,>=2.4.1->basic-pitch==0.2.0) (3.2.2)

fatualux avatar Feb 26 '23 21:02 fatualux