Open harshil-sanghvi opened 2 years ago
It isn't totally clear from this error what all is going on. One of the errors indicates that pip is trying to build llvmlite from source code, which is challenging and requires LLVM be installed first (that is the llvm-config
error), but I would not recommend allowing pip to install llvmlite from source code. The last error, however, looks like you are installing another package to the system Python site-packages, which is not recommended in general (not Numba specific advice).
What pip
command are you running? Can you create a virtualenv and install there instead of to the system site packages?
I am getting the following problem after activating a virtualenv. Cannot still import librosa. Please help.
(base) [19bce238@nirmashavak ~]$ conda activate ERA
(ERA) [19bce238@nirmashavak ~]$ pip install librosa
Requirement already satisfied: librosa in ./.conda/envs/ERA/lib/python3.7/site-packages (0.9.1)
Requirement already satisfied: resampy>=0.2.2 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (0.2.2)
Requirement already satisfied: scipy>=1.2.0 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (1.7.3)
Requirement already satisfied: joblib>=0.14 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (1.1.0)
Requirement already satisfied: packaging>=20.0 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (21.3)
Requirement already satisfied: pooch>=1.0 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (1.6.0)
Requirement already satisfied: audioread>=2.1.5 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (2.1.9)
Requirement already satisfied: decorator>=4.0.10 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (5.1.1)
Requirement already satisfied: soundfile>=0.10.2 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (0.10.3.post1)
Requirement already satisfied: scikit-learn>=0.19.1 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (1.0.2)
Requirement already satisfied: numpy>=1.17.0 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (1.19.5)
Requirement already satisfied: numba>=0.45.1 in ./.conda/envs/ERA/lib/python3.7/site-packages (from librosa) (0.55.2)
Requirement already satisfied: llvmlite<0.39,>=0.38.0rc1 in ./.conda/envs/ERA/lib/python3.7/site-packages (from numba>=0.45.1->librosa) (0.38.1)
Requirement already satisfied: setuptools in ./.conda/envs/ERA/lib/python3.7/site-packages (from numba>=0.45.1->librosa) (61.2.0)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in ./.conda/envs/ERA/lib/python3.7/site-packages (from packaging>=20.0->librosa) (3.0.4)
Requirement already satisfied: requests>=2.19.0 in ./.conda/envs/ERA/lib/python3.7/site-packages (from pooch>=1.0->librosa) (2.27.1)
Requirement already satisfied: appdirs>=1.3.0 in ./.conda/envs/ERA/lib/python3.7/site-packages (from pooch>=1.0->librosa) (1.4.4)
Requirement already satisfied: charset-normalizer~=2.0.0 in ./.conda/envs/ERA/lib/python3.7/site-packages (from requests>=2.19.0->pooch>=1.0->librosa) (2.0.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./.conda/envs/ERA/lib/python3.7/site-packages (from requests>=2.19.0->pooch>=1.0->librosa) (1.26.9)
Requirement already satisfied: certifi>=2017.4.17 in ./.conda/envs/ERA/lib/python3.7/site-packages (from requests>=2.19.0->pooch>=1.0->librosa) (2022.5.18.1)
Requirement already satisfied: idna<4,>=2.5 in ./.conda/envs/ERA/lib/python3.7/site-packages (from requests>=2.19.0->pooch>=1.0->librosa) (3.3)
Requirement already satisfied: six>=1.3 in ./.conda/envs/ERA/lib/python3.7/site-packages (from resampy>=0.2.2->librosa) (1.15.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in ./.conda/envs/ERA/lib/python3.7/site-packages (from scikit-learn>=0.19.1->librosa) (3.1.0)
Requirement already satisfied: cffi>=1.0 in ./.conda/envs/ERA/lib/python3.7/site-packages (from soundfile>=0.10.2->librosa) (1.15.0)
Requirement already satisfied: pycparser in ./.conda/envs/ERA/lib/python3.7/site-packages (from cffi>=1.0->soundfile>=0.10.2->librosa) (2.21)
(ERA) [19bce238@nirmashavak ~]$ python
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import librosa
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'librosa'
>>>
I am getting the following problem after activating a virtualenv. Cannot still import librosa. Please help.
There are a few things to note here which indicate that there are issues with the way you installed or are using python
, pip
and conda
.
> (base) [19bce238@nirmashavak ~]$ conda activate ERA
> (ERA) [19bce238@nirmashavak ~]$ pip install librosa
> Requirement already satisfied: librosa in ./.conda/envs/ERA/lib/python3.7/site-packages (0.9.1)
Two comments on the above:
conda
you can use conda
to install packages instead of pip
. Also, you are activating a "conda environment" not a "virtualenv". These technologies are quite different but like to be confused in practice.librosa
is installed.> (ERA) [19bce238@nirmashavak ~]$ python
> Python 3.6.8 (default, Nov 16 2020, 16:55:22)
This indicates that a different python
-- namely a 3.6 -- was used instead of the python
3.7 that is installed in the conda environment. I am not sure how this happened in your case, but it is clear that librosa was not installed for this version of Python and so it can not be found. You can use the command which -a
to find all the Pythons that are currently available on your system.
I upgraded the TBB and then also got the following error. Please help.