我正在尝试运行此代码,该代码可视化音频波形及其傅立叶变换
它需要Numpy,Pyqt和Pyqtgraph。当我运行它时,我会发现蝙蝠的错误。
from pyqtgraph.Qt import QtGui, QtCore
ModuleNotFoundError: No module named 'pyqtgraph'
我知道我已经安装了此功能,因为我的站点包装夹中有pyqtgraph。我使用PIP安装pyqtgraph将其安装,如果我再次运行命令,它将确认已经执行了安装。
我在做什么错?有一些版本不兼容吗?我需要在我的PJ上做一点舞蹈才能使它起作用吗?我不知道。
I am trying to run this code that visualizes audio waveforms and their fourier transforms
https://github.com/markjay4k/Audio-Spectrum-Analyzer-in-Python/commit/ff9caf4156b7a8c039d8beba987f93566a6aace0
It requires numpy, PyQt, and pyqtgraph. When I run it, I get an error right of the bat.
from pyqtgraph.Qt import QtGui, QtCore
ModuleNotFoundError: No module named 'pyqtgraph'
I know I installed this, because I have pyqtgraph in my site-packages folder. I used pip install pyqtgraph to install it, and if I run the command again, it confirms that the install has already been performed.
What am I doing wrong? Is there some version incompatability? Do I need to do a little dance in my PJs to get it working? I'm not sure.
发布评论
评论(1)
通常,当您尝试在不同的Python版本,虚拟环境或平台中使用库时,这种情况通常会发生。我会按以下方式进行故障排除:
python
版本,请确保您正在安装库的版本上运行。pip
和conda
,请确保在正确的平台上运行代码。Python
版本和平台都可以,请检查您在安装了相关库的同一虚拟环境中工作。我认为这是最可能的原因。您可以找到有关如何检查上述所有内容的大量教程。如果无效,您可以尝试卸载和重新安装。
This normally happens when you try to use a library in either a different Python version, virtual environment, or platform. I'd troubleshoot as follows:
Python
versions, make sure you are running on the one where the library is installed.pip
andconda
, make sure you are running the code on the correct platform.Python
version and platform are ok, check you are working in the same virtual environment where you installed the library in question. I think this is the most probable cause.You can find plenty of tutorials on how to check all the above. If nothing works, you can try uninstalling and reinstalling.