无法安装 Orange 3 ImportError: PyQt4, PyQt5 or PySide are not available for import

Aru*_*run 2 python pyqt4 orange

我正在使用 Ubuntu 14.04。我创建了一个虚拟环境并使用

pip install orange3
Run Code Online (Sandbox Code Playgroud)

我还使用安装了 PyQt4

 sudo apt-get install python3-pyqt4
Run Code Online (Sandbox Code Playgroud)

但是当我从终端启动 orange3 时,出现以下错误。

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
Run Code Online (Sandbox Code Playgroud)

K3-*_*rnc 5

似乎您在运行 Orange的环境中缺少 PyQt 版本。

最好pip3 install pyqt5在您通过 pip 安装 Orange 的同一终端中执行类似操作。