Travis-CI无法找到python3-pip包

时间:2015-06-26 05:26:30

标签: python linux ubuntu travis-ci

我需要pip3来安装测试包,但为此,我需要python3-pip。然而,对于特拉维斯来说,情况并非如此。

错误日志也不是很具描述性。

Using worker: worker-linux-e7a62211-2.bb.travis-ci.org:travis-linux-10
system_info
$ git clone --depth=50 --branch=travis-test git://github.com/OrkoHunter/networkx-metis.git OrkoHunter/networkx-metis
Cloning into 'OrkoHunter/networkx-metis'...
remote: Counting objects: 166, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 166 (delta 4), reused 0 (delta 0), pack-reused 154
Receiving objects: 100% (166/166), 205.67 KiB | 0 bytes/s, done.
Resolving deltas: 100% (28/28), done.
Checking connectivity... done.
$ cd OrkoHunter/networkx-metis
$ git checkout -qf 29ac745c9e5beb220e6c2c47e2e0a6c47cb02491
$ source ~/virtualenv/python2.7/bin/activate
$ python --version
Python 2.7.9
$ pip --version
pip 6.0.7 from /home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages (python 2.7)
before_install.1
$ sudo apt-get update
$ sudo apt-get install build-essential
$ sudo apt-get install python3-setuptools python-setuptools
$ sudo apt-get install --upgrade python-pip
$ sudo apt-get install --upgrade python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3-pip
The command "sudo apt-get install --upgrade python3-pip" failed and exited with 100 during .
Your build has been stopped.

1 个答案:

答案 0 :(得分:3)

截至目前,除非您在pip3基础架构上,否则there's no way在Travis CI上使用非sudo非Python构建trusty。切换到trusty,你很好。 Node.js项目的示例.travis.yml

sudo: false
dist: "trusty" # otherwise 'python3-pip' won't be available
language: "node_js"
addons:
  apt:
    packages:
      - "python3"
      - "python3-pip"
node_js:
  - "4"
  - "6"

...

before_install:
  - "pip3 install -r docs/requirements.txt"