我已经尝试构建一个Python程序,以完成一个实验,从而使具有不同层次的神经网络试图识别特定古典音乐的作曲者。该程序正在Macintosh Mojave系统上运行。为了协助我的努力,我尝试从特定来源获得一些信息:
但是,不幸的是,在完成该项目时,我遇到了一系列挫折。我最近遇到一个错误。
我在Python 3.6
文件中运行的程序是一系列导入的,尽管当时安装了librosa,但由于librosa导入而导致出现错误:
import librosa
import librosa.feature
import librosa.display
import glob
import numpy as np
import matplotlib.pyplot as plt
from keras.models import Sequential
from keras.layers import Dense, Activation
from keras.utils.np_utils import to_categorical
Python给出的错误消息:
回溯(最近通话最近):文件 “ /Users/surengrigorian/Documents/Stage1.py”,第1行,在 导入librosa ModuleNotFoundError:没有名为“ librosa”的模块
当我尝试检查是否已安装librosa时,Mac OS终端给出了以下消息:
Requirement already satisfied: librosa in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (0.6.2)
Requirement already satisfied: numba>=0.38.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from librosa) (0.42.0)
Requirement already satisfied: decorator>=3.0.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from librosa) (4.3.0)
Requirement already satisfied: numpy>=1.8.0 in ./Library/Python/3.7/lib/python/site-packages (from librosa) (1.15.4)
Requirement already satisfied: joblib>=0.12 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from librosa) (0.13.0)
Requirement already satisfied: scikit-learn!=0.19.0,>=0.14.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from librosa) (0.20.2)
Requirement already satisfied: resampy>=0.2.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from librosa) (0.2.1)
Requirement already satisfied: audioread>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from librosa) (2.1.6)
Requirement already satisfied: six>=1.3 in ./Library/Python/3.7/lib/python/site-packages (from librosa) (1.12.0)
Requirement already satisfied: scipy>=0.14.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from librosa) (1.2.0)
Requirement already satisfied: llvmlite>=0.27.0dev0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from numba>=0.38.0->librosa) (0.27.0)