Cannot install Orange 3 ImportError: PyQt4, PyQt5 or PySide are not available for import

早过忘川 提交于 2019-12-13 00:13:24

问题


I am using Ubuntu 14.04. I have created a virtual environment and installed Orange using

pip install orange3

I also installed PyQt4 using

 sudo apt-get install python3-pyqt4

But when I launch orange3 from terminal I got the following error.

Traceback (most recent call last):
  File "/home/arun/.virtualenvs/orange3env/bin/orange-canvas", line 11, in <module>
    load_entry_point('Orange3', 'gui_scripts', 'orange-canvas')()
  File "/home/arun/.virtualenvs/orange3env/lib/python3.4/site-packages/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/arun/.virtualenvs/orange3env/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2649, in load_entry_point
    return ep.load()
  File "/home/arun/.virtualenvs/orange3env/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2303, in load
    return self.resolve()
  File "/home/arun/.virtualenvs/orange3env/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2309, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/arun/lab/orange3/Orange/canvas/__main__.py", line 21, in <module>
    from AnyQt.QtGui import QFont, QColor, QDesktopServices
  File "/home/arun/.virtualenvs/orange3env/lib/python3.4/site-packages/AnyQt/QtGui.py", line 1, in <module>
    from . import _api
  File "/home/arun/.virtualenvs/orange3env/lib/python3.4/site-packages/AnyQt/_api.py", line 96, in <module>
    raise ImportError("PyQt4, PyQt5 or PySide are not available for import")
ImportError: PyQt4, PyQt5 or PySide are not available for import

回答1:


Seems like you are missing a version of PyQt in the environment you run Orange from.

Best do something like pip3 install pyqt5 in the same terminal you pip-installed Orange.



来源:https://stackoverflow.com/questions/44697677/cannot-install-orange-3-importerror-pyqt4-pyqt5-or-pyside-are-not-available-fo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!