Pip正在/ tmp /中安装依赖项并且无法构建

时间:2017-03-03 21:47:43

标签: python continuous-integration gitlab pipeline pep8

Pep8(或任何其他依赖项)正在安装到/ tmp目录!因此gitlab找不到pep8的位置。结果是构建失败了。有什么想法吗?

我使用默认的python图像。

.gitlab-ci.yml:

  image: python:2.7

  stages:
    - build

  before_script:
    - pip install -t lib --verbose --upgrade pep8

  build:
    stage: build
    script:
    - pep8 models.py

管道输出:

Running with gitlab-ci-multi-runner 1.10.4 (b32125f)
Using Docker executor with image python:2.7 ...
Pulling docker image python:2.7 ...
Running on runner-e11ae361-project-2809953-concurrent-0 via runner-e11ae361-machine-1488576920-6d45b081-digital-ocean-4gb...
Cloning repository...
Cloning into '/builds/MiladK/shogh.ly'...
Checking out 7f28b212 as master...
Skipping Git submodules setup
$ pip install -t lib --verbose --upgrade pep8
Collecting pep8
  1 location(s) to search for versions of pep8:
  * https://pypi.python.org/simple/pep8/
  Getting page https://pypi.python.org/simple/pep8/
  Looking up "https://pypi.python.org/simple/pep8/" in the cache
  No cache entry available
  Starting new HTTPS connection (1): pypi.python.org
  "GET /simple/pep8/ HTTP/1.1" 200 3403
  Updating cache with response from "https://pypi.python.org/simple/pep8/"
  Caching b/c date exists and max-age > 0
  Analyzing links from page https://pypi.python.org/simple/pep8/
    Found link https://pypi.python.org/packages/00/7f/96c5a5d0c1207b724236df22c5222577e645109e1c2989acda056c67cc06/pep8-1.6.2-py2.py3-none-any.whl#md5=d1c1f046a98f165628f60106faaee35a (from https://pypi.python.org/simple/pep8/), version: 1.6.2
    Found link https://pypi.python.org/packages/02/1a/fb362c89f45ea42c8682f31b78381224fec989659a8f93d1262e0a2ee787/pep8-1.6.0-py2.py3-none-any.whl#md5=b1be16bc2ea703054873a14e4447a95f (from https://pypi.python.org/simple/pep8/), version: 1.6.0
    Found link https://pypi.python.org/packages/04/77/c04dfc736036c0f22771bda461d4533938353d1340b62d331f6fc828764a/pep8-0.4.tar.gz#md5=58426b5d7f9e4615e128278c9c5732d4 (from https://pypi.python.org/simple/pep8/), version: 0.4
    Found link https://pypi.python.org/packages/08/96/4245af89ed6b796e8aaa5f9ab5142b2dd9c1962f57a66e7c102dc5ccd6bd/pep8-0.6.1.tar.gz#md5=49380cdf6ba2e222e8630cb0afe29d66 (from https://pypi.python.org/simple/pep8/), version: 0.6.1
    Found link https://pypi.python.org/packages/15/5d/1a6a614ae43dbc93b646142a11a59eb8f7d3528beb41ff42aa18b741816e/pep8-1.5.6.tar.gz#md5=86a0f1834208e5ac11323fdd6ccd17cd (from https://pypi.python.org/simple/pep8/), version: 1.5.6
    Found link https://pypi.python.org/packages/1b/6e/47b5064e29c3d8f1e7c73cd69df8cca4b2c9bb67410fc5be2785481d6d9c/pep8-0.7.0.tar.gz#md5=c5345484faf867cdf0878871a30cd94b (from https://pypi.python.org/simple/pep8/), version: 0.7.0
    Found link https://pypi.python.org/packages/1d/ab/f2735e3aa8b59d250489ab12a045ed7a696f42df31eff93ce04bf37951b4/pep8-1.4.2.tar.gz#md5=af2777047025c7302fc1cad073e4617d (from https://pypi.python.org/simple/pep8/), version: 1.4.2
    Found link https://pypi.python.org/packages/1e/a8/58000ffbdd82b61c12c0d70d162f7aa3ffcf566b818f453c25d253c82d48/pep8-1.5.5.tar.gz#md5=8b7ad1ebdbd22a753b466994ed4f84ad (from https://pypi.python.org/simple/pep8/), version: 1.5.5
    Found link https://pypi.python.org/packages/1f/88/432b609e0c14fda392d9a1b012222681e4f627372c0543100e640c3e25d3/pep8-1.5.4-py2.py3-none-any.whl#md5=8df25701c8ef554ae41745254f086e1b (from https://pypi.python.org/simple/pep8/), version: 1.5.4
    Found link https://pypi.python.org/packages/2a/cd/4f5a3c0ff7afff389bee4faea0904cbd6eda0acdfee3af8faf5471137508/pep8-1.4.3.tar.gz#md5=6dc6ffbebda6cadbad4c789933dd0d23 (from https://pypi.python.org/simple/pep8/), version: 1.4.3
    Found link https://pypi.python.org/packages/2a/df/431a70e9c0b9641fdc6bc9490f9026e4078ffa3c7c87507a39e3f1956b86/pep8-1.3.4.tar.gz#md5=2491a3c316d564d87b21c686ec77e9f6 (from https://pypi.python.org/simple/pep8/), version: 1.3.4
    Found link https://pypi.python.org/packages/2b/d1/19fc760ee766b1787c2f302bea294635446c4985af52662416eeb3c742b5/pep8-1.4.4.tar.gz#md5=c48dc736e09f4f76362572c4e8b55be3 (from https://pypi.python.org/simple/pep8/), version: 1.4.4
    Found link https://pypi.python.org/packages/2d/ee/21d876606a93d86e598b078c7b27f2cf41a2a6864fc02b1f423a98c47185/pep8-1.5.3.tar.gz#md5=ce9b1ce848e3fe79b8f94d8776d1a343 (from https://pypi.python.org/simple/pep8/), version: 1.5.3
    Found link https://pypi.python.org/packages/31/30/b9ad1b8484b5e53fb508929ce9aec3f3c7372beaba93600e3f0abf7e1e8d/pep8-1.5.5-py2.py3-none-any.whl#md5=c72f1cbb5df0c06182083bcf3fa2042f (from https://pypi.python.org/simple/pep8/), version: 1.5.5
    Found link https://pypi.python.org/packages/37/d3/e877ec2bff90030e09bf1bc0869b3d8cd82e0b3b6b5ead0bbf0de0aaed8d/pep8-0.4.2.tar.gz#md5=da8562ef0b18ae9ced210cff742a2d1b (from https://pypi.python.org/simple/pep8/), version: 0.4.2
    Found link https://pypi.python.org/packages/3e/b5/1f717b85fbf5d43d81e3c603a7a2f64c9f1dabc69a1e7745bd394cc06404/pep8-1.7.0.tar.gz#md5=2b03109b0618afe3b04b3e63b334ac9d (from https://pypi.python.org/simple/pep8/), version: 1.7.0
    Found link https://pypi.python.org/packages/4d/67/8ce50d74c31b068f668c438af147b3fb7d1aa5f9b905d4da0c0efbb3326e/pep8-1.5.0.tar.gz#md5=fb6f5790a07cded8e6a4d1db8536f670 (from https://pypi.python.org/simple/pep8/), version: 1.5.0
    Found link https://pypi.python.org/packages/5a/35/98f0324eb55f3438becf3359d942a418f00e89b56bf344751c93fd143328/pep8-1.0.1.tar.gz#md5=f9d7cfbc91fc1c5c31bba5f60f0f4137 (from https://pypi.python.org/simple/pep8/), version: 1.0.1
    Found link https://pypi.python.org/packages/63/17/a9805b9e94053860aec9cf2e7d59e0552f6981a98b8279cf0e121c33506d/pep8-0.6.0.tar.gz#md5=7e9e9294e08f80477c0132d3bc495410 (from https://pypi.python.org/simple/pep8/), version: 0.6.0
    Found link https://pypi.python.org/packages/68/f8/371f06dc299a6fc2804f7c853ae1ad3e97d1387f3d9c41c827bc637b3560/pep8-1.5.3-py2.py3-none-any.whl#md5=0654904760aa9a24062bf367f39e873e (from https://pypi.python.org/simple/pep8/), version: 1.5.3
    Found link https://pypi.python.org/packages/70/e9/827e1599c3055d01f1dbef49f15b6c317b9787c29ef279ebc03b1fdb4c70/pep8-1.5.4.tar.gz#md5=5a451ad5694187d36af046b4724920e1 (from https://pypi.python.org/simple/pep8/), version: 1.5.4
    Found link https://pypi.python.org/packages/82/50/4b60e79dbfc16c2428a4259621f4ea7a79d20761e3346f5503dda84bf78d/pep8-1.1.tar.gz#md5=f2aff82a27467c19b27edb1b271eace5 (from https://pypi.python.org/simple/pep8/), version: 1.1
    Found link https://pypi.python.org/packages/89/54/6a661460cbdab882cac0d5f1c9fd1f8d41601e244c5be7a9a9b910ba74c6/pep8-1.3.2.tar.gz#md5=d8190162a6bd1ec071b5a77d064a677d (from https://pypi.python.org/simple/pep8/), version: 1.3.2
    Found link https://pypi.python.org/packages/8a/cb/7d0fdca7e03f997945fb1bd60a8ddfea5c51229b865c470b4f7a64619d20/pep8-1.7.0-py2.py3-none-any.whl#md5=6cfe097210e2efb1d9ee4ee62fb24a7e (from https://pypi.python.org/simple/pep8/), version: 1.7.0
    Found link https://pypi.python.org/packages/8b/de/259f5e735897ada1683489dd514b2a1c91aaa74e5e6b68f80acf128a6368/pep8-1.5.7.tar.gz#md5=f6adbdd69365ecca20513c709f9b7c93 (from https://pypi.python.org/simple/pep8/), version: 1.5.7
    Found link https://pypi.python.org/packages/95/9c/f17b50aa182fec649a0d3b593f72fc2568800049e6fc24193c4ee4318fe8/pep8-1.0.tar.gz#md5=3b28eeac34ec9e694986effdc8796e78 (from https://pypi.python.org/simple/pep8/), version: 1.0
    Found link https://pypi.python.org/packages/97/44/a4eb6f61e77a310e13cff3d3dd43b87d46b87aeacb17fd290ee1680701b1/pep8-1.2.tar.gz#md5=057cf01c3099d795da5f9a193410ab2f (from https://pypi.python.org/simple/pep8/), version: 1.2
    Found link https://pypi.python.org/packages/9e/fd/e1dbf819ab64fc327b442640807ad814f9dc6690ab6b2e295deb49d2debb/pep8-1.5.2-py2.py3-none-any.whl#md5=a0caba277a2f491b1634246a338a1235 (from https://pypi.python.org/simple/pep8/), version: 1.5.2
    Found link https://pypi.python.org/packages/a2/c5/10f274aaaacd6d925b844107f51f8128e1af14b1f14d6904984b284c808a/pep8-1.6.0.tar.gz#md5=9da8da26d955922a633e9f6ceee63c29 (from https://pypi.python.org/simple/pep8/), version: 1.6.0
    Found link https://pypi.python.org/packages/ab/f6/db86be798ea62c42747c6527f2fbd9364f8d1ffddf7579ba286a82ef67e7/pep8-0.4.1.tar.gz#md5=7aea2c03759f7a292f1b6e62a62aaf41 (from https://pypi.python.org/simple/pep8/), version: 0.4.1
    Found link https://pypi.python.org/packages/ae/25/b2628af7b1d8eb60f155c24194c76a74f08ec22c8512b54c5cd45b6b9e5f/pep8-1.3.tar.gz#md5=31e24f6e447646500d0c704c33824f68 (from https://pypi.python.org/simple/pep8/), version: 1.3
    Found link https://pypi.python.org/packages/b1/da/fe16546eac93fd96e88d2378267d7818ccbff166a812d07c34c1e1689499/pep8-1.3.1.tar.gz#md5=85586d1bdc4e9632b7a87a1d9b4da42b (from https://pypi.python.org/simple/pep8/), version: 1.3.1
    Found link https://pypi.python.org/packages/b5/46/487b129aaaa9bdc52077b89153a9945ab6951dcee8c53da162035be16f08/pep8-1.6.1-py2.py3-none-any.whl#md5=f7ac726e7aa33829e14bbb92b30e14c0 (from https://pypi.python.org/simple/pep8/), version: 1.6.1
    Found link https://pypi.python.org/packages/b7/93/f763e9fa4c4899b2b868998f5449fca3abf570f8908adbc7b339c51138b4/pep8-1.5.1.tar.gz#md5=cc676d057449bf2a4fcd347a51d36444 (from https://pypi.python.org/simple/pep8/), version: 1.5.1
    Found link https://pypi.python.org/packages/b8/6a/38abb1b19ac1b73f568f533a371cfd783e50c8f8297aec5454d9b7a3c0f6/pep8-1.5.2.tar.gz#md5=076c22d07abe0bd52ca5735f5db35738 (from https://pypi.python.org/simple/pep8/), version: 1.5.2
    Found link https://pypi.python.org/packages/c5/de/5bfd80ea3b7e3fdf76ba12c832be60b886a2651cb9badd11848ebd9d0d11/pep8-1.5.6-py2.py3-none-any.whl#md5=c7da9fb6a4316b53b6a873de076441e2 (from https://pypi.python.org/simple/pep8/), version: 1.5.6
    Found link https://pypi.python.org/packages/c8/9b/5f4744c655bf125d2aee479906e3bfb89ade836980fa1b61cb5bb229545b/pep8-1.4.1.tar.gz#md5=8be92becea6c6deb8f5d1271f695af5e (from https://pypi.python.org/simple/pep8/), version: 1.4.1
    Found link https://pypi.python.org/packages/dd/32/16720c00dee98cc809b1c75659dbd34eaa73942e12f8f7545af90a7d3ac8/pep8-1.6.1.tar.gz#md5=76cf60b245f8549cb458ffcd85710738 (from https://pypi.python.org/simple/pep8/), version: 1.6.1
    Found link https://pypi.python.org/packages/e1/51/aaa33923c89b2fc6962e1429af8bdbf55c445b0f0e8b3191fe31ef805e27/pep8-1.6.2.tar.gz#md5=c7a3f57d832484a6295164661fbb1335 (from https://pypi.python.org/simple/pep8/), version: 1.6.2
    Found link https://pypi.python.org/packages/e2/3a/fb53887b208e7e444c13b59244fcac4ef923678e6ae33e7fc71391f37b62/pep8-1.5.7-py2.py3-none-any.whl#md5=e64cf25ebf3ee49b1ab18ee7fb225d41 (from https://pypi.python.org/simple/pep8/), version: 1.5.7
    Found link https://pypi.python.org/packages/e4/f5/2bcd180813fe2d5f5c5097af0efbc7475d62bf563478e532ac1bf4414499/pep8-1.3.3.tar.gz#md5=093a99ced0cc3b58c01549d7350f5a73 (from https://pypi.python.org/simple/pep8/), version: 1.3.3
    Found link https://pypi.python.org/packages/ec/a9/059a0bab891fe064acd698ec4853638b34ab7e1885634171e4d49491f522/pep8-1.4.5.tar.gz#md5=055dbd22ac5669232fdba752612e9686 (from https://pypi.python.org/simple/pep8/), version: 1.4.5
    Found link https://pypi.python.org/packages/f2/33/55a79369eb1d94e2eb528696b9d71ae9cd073c8c5b0dfdd09f269d3492bb/pep8-1.4.tar.gz#md5=a97e808adecf2b4adb345c88e68336fd (from https://pypi.python.org/simple/pep8/), version: 1.4
    Found link https://pypi.python.org/packages/fa/06/07c5110fffa1105612c9f876b745969747f63612a8d512769b32e3d7d4ad/pep8-0.5.0.tar.gz#md5=512a818af9979290cd619cce8e9c2e2b (from https://pypi.python.org/simple/pep8/), version: 0.5.0
    Found link https://pypi.python.org/packages/fa/46/3e82153575bd163bdf2e599652cb331b67cdecc3dbc69bb23d354c02354b/pep8-1.4.6.tar.gz#md5=a03bb494859e87b42601b61b1b043a0c (from https://pypi.python.org/simple/pep8/), version: 1.4.6
    Found link https://pypi.python.org/packages/fd/74/ace166a01751241a07a8fdd8d3c1d475f794fdd8f5a8f8df8ae07b21e80f/pep8-0.3.1.tar.gz#md5=4bc81d8de009ca1e8bc5f976448ab7b3 (from https://pypi.python.org/simple/pep8/), version: 0.3.1
  Using version 1.7.0 (newest of versions: 0.3.1, 0.4, 0.4.1, 0.4.2, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 1.0, 1.0.1, 1.1, 1.2, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.6.0, 1.6.1, 1.6.2, 1.7.0)
  Looking up "https://pypi.python.org/packages/8a/cb/7d0fdca7e03f997945fb1bd60a8ddfea5c51229b865c470b4f7a64619d20/pep8-1.7.0-py2.py3-none-any.whl" in the cache
  No cache entry available
  "GET /packages/8a/cb/7d0fdca7e03f997945fb1bd60a8ddfea5c51229b865c470b4f7a64619d20/pep8-1.7.0-py2.py3-none-any.whl HTTP/1.1" 200 41163
  Downloading pep8-1.7.0-py2.py3-none-any.whl (41kB)
  Downloading from URL https://pypi.python.org/packages/8a/cb/7d0fdca7e03f997945fb1bd60a8ddfea5c51229b865c470b4f7a64619d20/pep8-1.7.0-py2.py3-none-any.whl#md5=6cfe097210e2efb1d9ee4ee62fb24a7e (from https://pypi.python.org/simple/pep8/)
  Updating cache with response from "https://pypi.python.org/packages/8a/cb/7d0fdca7e03f997945fb1bd60a8ddfea5c51229b865c470b4f7a64619d20/pep8-1.7.0-py2.py3-none-any.whl"
  Caching due to etag
Installing collected packages: pep8

  Creating /tmp/tmpp0SfbQ/bin
  changing mode of /tmp/tmpp0SfbQ/bin/pep8 to 755
Successfully installed pep8-1.7.0
Cleaning up...
$ pep8 models.py
/bin/bash: line 48: pep8: command not found
ERROR: Build failed: exit code 1

1 个答案:

答案 0 :(得分:0)

我已经解决了。这对我有用:

python -m pip install pep8

pep8安装在这里:

/usr/local/bin/pep8