我已经使用Python 3.5.2安装了Anaconda3。
我试图运行示例脚本,而对于行import matplotlib.pyplot as plt
,我收到了错误
import matplotlib.pyplot as plt
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 113, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\__init__.py", line 60, in pylab_setup
[backend_name], 0)
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 16, in <module>
from .backend_qt5 import (
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\backend_qt5.py", line 18, in <module>
import matplotlib.backends.qt_editor.figureoptions as figureoptions
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\qt_editor\figureoptions.py", line 20, in <module>
import matplotlib.backends.qt_editor.formlayout as formlayout
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\qt_editor\formlayout.py", line 56, in <module>
from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\qt_compat.py", line 137, in <module>
from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: DLL load failed: The specified procedure could not be found.
Process finished with exit code 1
我已经尝试过Google问题,并找到了通过pip安装PyQt5的解决方案。
我尝试过这样做并收到以下错误:PermissionError: [Errno 13] Permission denied: 'C:\\Users\\MY_USER\\AppData\\Local\\Temp\\pip-build-9t4n1ox1\\pyqt5\\PyQt5/Qt/qml/QtQuick/Controls/Private/CalendarUtils.js'
我真的不知道如何从这里继续......任何想法?感谢
答案 0 :(得分:0)
我最终“黑客”pip的__init__.py
文件以保存构建的软件包而不是AppData,然后我将文件夹的内容复制到\ Lib \ site-packages目录。
感谢您的帮助尝试:)