[英]Cannot install PyQt5 for Python 3.5.2 in my Windows 10
I have installed Anaconda3, with Python 3.5.2. 我已经用Python 3.5.2安装了Anaconda3。 I'm trying to run an example script and for the line import matplotlib.pyplot as plt
I get the error 我正在尝试运行示例脚本,并在行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
I've tried to Google the issue and found a solution to install PyQt5 via pip. 我曾尝试通过Google搜索该问题,并找到了一种通过pip安装PyQt5的解决方案。 I've tried to do it and get the following error: PermissionError: [Errno 13] Permission denied: 'C:\\\\Users\\\\MY_USER\\\\AppData\\\\Local\\\\Temp\\\\pip-build-9t4n1ox1\\\\pyqt5\\\\PyQt5/Qt/qml/QtQuick/Controls/Private/CalendarUtils.js'
我尝试执行此操作并得到以下错误: PermissionError: [Errno 13] Permission denied: 'C:\\\\Users\\\\MY_USER\\\\AppData\\\\Local\\\\Temp\\\\pip-build-9t4n1ox1\\\\pyqt5\\\\PyQt5/Qt/qml/QtQuick/Controls/Private/CalendarUtils.js'
I really don't know how to go on from here...any ideas? 我真的不知道该怎么办...任何想法? Thanks 谢谢
I ended up "hacking" pip's __init__.py
file to save the built package in Desktop and not in AppData, then I took the folder's contents and copied it to \\Lib\\site-packages directory. 我最终“入侵”了pip的__init__.py
文件,将生成的程序包保存在Desktop中,而不是AppData中,然后我将文件夹的内容复制到\\ Lib \\ site-packages目录中。
Thanks for the help attempts :) 感谢您的帮助尝试:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.