如何在 travis-ci 中构建 scikit-image?

How to build scikit-image in travis-ci?

我正在尝试构建一个在 Travis-ci 上使用 scikit-image 的脚本。它抱怨 six 不是最新的。可以肯定的是,我尝试在 github 上复制 scikit-image 项目的 .travis.yml,但它并没有改变这种情况。我也试过更新six,但是没有用...

有人知道如何在 travis 上构建 scikit-image 吗?

我的requirements.txt:

# Requirements list:
scikit-image

我的踪迹:

$ source ~/virtualenv/python3.3/bin/activate

$ python --version

Python 3.3.5

$ pip --version

pip 6.0.7 from /home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages (python 3.3)

5.80s$ pip install -r requirements.txt

You are using pip version 6.0.7, however version 6.0.8 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

Collecting scikit-image (from -r requirements.txt (line 2))

Downloading scikit-image-0.10.1.tar.gz (16.7MB)

100% |################################| 16.7MB 20kB/s

Traceback (most recent call last):

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

File "/tmp/pip-build-wsd_vd/scikit-image/setup.py", line 110, in <module>

check_requirements()

File "/tmp/pip-build-wsd_vd/scikit-image/setup.py", line 105, in check_requirements

% ((package_name, ) + min_version))

ImportError: You need `six` version 1.3 or later.

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

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

File "/tmp/pip-build-wsd_vd/scikit-image/setup.py", line 110, in <module>

check_requirements()

File "/tmp/pip-build-wsd_vd/scikit-image/setup.py", line 105, in check_requirements

% ((package_name, ) + min_version))

ImportError: You need `six` version 1.3 or later.

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-wsd_vd/scikit-image

The command "pip install -r requirements.txt" failed and exited with 1 during .

Your build has been stopped.

如果您收到未满足特定依赖项的错误,更具体地说明该依赖项通常会有所帮助。我喜欢把我不直接使用的依赖项放在 before_install 部分。

before_install:
    pip install six>=1.3
install:
    pip install -r requirements.txt

pip 允许您对安装的软件包版本指定限制。如果你必须使用 1.3,你可以使用 ==.