【问题标题】:How can I solve this orange installation with pip error?如何解决这个带有 pip 错误的橙色安装?
【发布时间】:2019-01-08 04:45:43
【问题描述】:

收集橙子

Downloading https://files.pythonhosted.org/packages/43/61/29c81c53504fb4c774eaec5218ca39f5d2625a61f0f6a52c61097be17f1c/Orange-2.7.8.tar.gz (15.0MB)
100% |████████████████████████████████| 15.0MB 1.8MB/s 
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-gz6v8uk6/Orange/setup.py", line 261
    except OSError, ex:
                  ^
SyntaxError: invalid syntax

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-gz6v8uk6/Orange/

请帮我解决这个问题。提前致谢!

【问题讨论】:

  • 你试过sudo吗?
  • @thaingi 你用过pip install orange3
  • 我使用 sudo。当 pip install orange3,fastTSNE/quad_tree.c:28:20: 致命错误: Python.h: No such file or directory #include "Python.h" ^ 编译终止。错误:命令“x86_64-linux-gnu-gcc”失败,退出状态为 1
  • 我使用了命令pip3 install orange3 并且工作正常。
  • @thaingi 那个错误很容易解决,安装Python开发包即可。 Python.h 是此类包中 Python 源代码中的头文件。显然,Orange 3 需要编译一些 C 扩展,并且需要为此提供 Python 源代码。

标签: python


【解决方案1】:

它发生在我身上,这是一个版本问题。这个过程解决了这个问题:

pip3 install --upgrade pip
python3 -m pip install --upgrade setuptools
pip3 install orange3

【讨论】:

    【解决方案2】:

    几年前,Python 3 改变了这个表达式的书写方式。

    它已更改为except OSError as e。 来源:Python : except OSError, e:

    摆脱它的另一种方法是安装orange3而不是orange。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-29
      • 1970-01-01
      • 2020-08-03
      • 1970-01-01
      相关资源
      最近更新 更多