简体   繁体   中英

Cannot install PyQt5 for Python 3.5.2 in my Windows 10

I have installed Anaconda3, with Python 3.5.2. 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
  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. 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'

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.

Thanks for the help attempts :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM