【问题标题】:Installing Orange into a virtualenv将 Orange 安装到 virtualenv 中
【发布时间】:2015-01-17 00:42:25
【问题描述】:

Linux Mint 17.1 与本机 Python 2.7.6。

INSTALL.txt 中列出的所有先决条件: python-numpy libqt4-opengl-dev libqt4-dev cmake qt4-qmake python-sip-dev python-qt4 python-qt4-dev python-qwt5-qt4 python-sip graphviz python-networkx python-imaging python-qt4-gl build-essential python-pip python-scipy python-pyparsing ipython python-matplotlib

有人在 virtualenv 中安装了 orange 吗?我正在尝试使用 pip 将 Orange 安装到 virtualenv 中,如下所示:

$ cd ~/venv/
$ mkdir orange
$ cd orange
$ virtualenv venv
$ source venv/bin/activate
$ pip install --global-option="build_pyqt_ext" orange

安装开始得很好:

Collecting orange
  Using cached Orange-2.7.8.tar.gz
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./venv/lib/python2.7/site-packages (from orange)
Collecting numpy (from orange)
  Using cached numpy-1.9.1.tar.gz
    Running from numpy source directory.
Collecting scipy (from orange)
  Using cached scipy-0.15.0.tar.gz

此时会出现暂停(编译),最终会出现一长串错误,我在此处发布了这些错误:http://pastebin.com/VZWyGjfz,并在下面添加了最后几行:

Complete output from command /home/citmkd/venv/orange/venv/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-dLY2eU/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" build_pyqt_ext install --record /tmp/pip-r8dA2D-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/citmkd/venv/orange/venv/include/site/python2.7:
Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/tmp/pip-build-dLY2eU/scipy/setup.py", line 249, in <module>

    setup_package()

  File "/tmp/pip-build-dLY2eU/scipy/setup.py", line 237, in setup_package

    from numpy.distutils.core import setup

ImportError: No module named numpy.distutils.core

----------------------------------------
Command "/home/citmkd/venv/orange/venv/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-dLY2eU/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" build_pyqt_ext install --record /tmp/pip-r8dA2D-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/citmkd/venv/orange/venv/include/site/python2.7" failed with error code 1 in /tmp/pip-build-dLY2eU/scipy

【问题讨论】:

    标签: orange


    【解决方案1】:

    这似乎是 pip 或 scipy 的安装脚本中的错误(您可以尝试单独安装 numpy、scipy 即pip install numpy &amp;&amp; pip install scipy)。

    请注意,在任何情况下,您都应该使用系统提供的 numpy、scipy、... 使用virtualenv --system-site-packages venv创建虚拟环境。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-02-04
      • 2021-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-09
      • 2012-09-14
      • 1970-01-01
      相关资源
      最近更新 更多