[英]Use Python 3.6.0 in circleci
我正在使用python 3.6啟動新項目,我想將circleci附加到我的項目中。
我的circle.yml是
machine:
timezone:
Asia/Seoul
python:
version: 3.6.0
dependencies:
pre:
- pip install -r requirements/ci.txt
test:
post:
- python manage.py test
和circleci錯誤
python-build: definition not found: 3.6.0
The following versions contain `3.6.0' in the name:
3.6.0b1
See all available versions with `pyenv install --list'.
If the version you need is missing, try upgrading pyenv:
cd /opt/circleci/.pyenv/plugins/python-build/../.. && git pull && cd -
((if (or (= "3.6.0" "system") (pyenv versions --bare | grep -x -q "'3.6.0'")) (pyenv global "3.6.0") (chain-and (pyenv install --skip-existing "" "3.6.0") (pyenv global "3.6.0") (pyenv rehash) (pip install virtualenv) (pip install nose) (pip install pep8) (pyenv rehash)))) returned exit code 2
Action failed: set python version to 3.6.0
似乎circleci不支持最新的pyenv版本。
我如何解決它?
您現在可以通過在circle.yml
中使用以下內容,在circle.yml
使用Python 3.6.0(在默認的Ubuntu 14.04映像中):
machine:
pre:
- cd /opt/circleci/.pyenv; git pull
python:
version: 3.6.0
你在這里放棄的是大約2分鍾的構建時間。 這是一個解決方法,如果你需要3.6.0,直到新的CCI Ubuntu 14.04圖像在接下來的3周左右出來。
對於那些今天發現這個問題的人來說,CircleCI已經解決了這個問題,所以現在標准配置可以通過Python 3.6.1運行 例如,我的circle.yml
使用3.6.1:
machine:
python:
version: 3.6.1
...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.