0

我正在尝试在mac终端上通过pip install librosa安装librosa,pip3也有同样的问题。当我尝试安装 scikit-learn 时,它也会卡住。

仅此而已:

Collecting librosa
  Using cached librosa-0.8.1-py3-none-any.whl (203 kB)
Collecting packaging>=20.0
  Using cached packaging-21.0-py3-none-any.whl (40 kB)
Requirement already satisfied: numpy>=1.15.0 in /opt/homebrew/lib/python3.9/site-packages (from librosa) (1.21.0)
Requirement already satisfied: scipy>=1.0.0 in /opt/homebrew/lib/python3.9/site-packages (from librosa) (1.7.0)
Collecting numba>=0.43.0
  Using cached numba-0.53.1.tar.gz (2.2 MB)
Collecting resampy>=0.2.2
  Using cached resampy-0.2.2.tar.gz (323 kB)
Requirement already satisfied: soundfile>=0.10.2 in /opt/homebrew/lib/python3.9/site-packages (from librosa) (0.10.3.post1)
Collecting scikit-learn!=0.19.0,>=0.14.0
  Using cached scikit-learn-0.24.2.tar.gz (7.5 MB)
  Installing build dependencies ... \

我对此很陌生,请帮助我只想画一些频谱图。

python --version Python 2.7.16

python3 --版本 Python 3.9.6

pip --version pip 21.1.3 来自 /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)

4

1 回答 1

0

在虚拟环境中工作可能对您有用。如果您尝试使用 python 3.9 安装,则可能存在许多依赖问题,因此使用较低版本也可能会解决您的问题。但是,请尝试使用 conda 环境,因为这将使您更轻松地跟踪安装包等。以下是安装说明

安装后,您可以使用较低的 python 版本创建 conda 环境:

conda create -n "py38" python=3.8 ipython

激活环境:

conda activate py38 

安装 librosa:

conda install -c conda-forge librosa
于 2021-09-24T18:23:19.733 回答