在circleci中使用Python 3.6.0

在circleci中使用Python 3.6.0,python,integration,circleci,pyenv,python-3.6,Python,Integration,Circleci,Pyenv,Python 3.6,我正在使用Python3.6启动一个新项目,我想将circleci附加到我的项目中 我的圈子是 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: def

我正在使用Python3.6启动一个新项目,我想将circleci附加到我的项目中

我的圈子是

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版本


如何修复它?

您现在可以在CircleCI(默认的Ubuntu 14.04图像)中使用Python 3.6.0,方法是在
circle.yml中使用以下内容:

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工作。例如,my
circle.yml
使用3.6.1:

machine:
  python:
    version: 3.6.1

...

我想在CircleCI支持最终版本之前,您必须使用测试版。我可以在CircleCI中安装最新版本的pyenv吗?这似乎很奇怪,我得到:cd/opt/CircleCI/.pyenv;git pull/home/ubuntu/.rvm/scripts/extras/bash_zsh_support/chpwd/function.sh:第5行:cd:/opt/circleci/.pyenv:没有这样的文件或目录致命:不是git存储库(或任何父目录):.git cd/opt/circleci/.pyenv;git pull返回退出代码128操作失败:cd/opt/circleci/.pyenv;git Pull 2018年既不提供
3.6.5
也不提供
3.6.4
:2018年应使用CircleCI 2.0,它支持任何Python版本。@Inti您可以分享使用此语法看到的错误吗?
Python构建:未找到定义:3.6.1使用“pyenv安装--列表”查看所有可用版本。如果缺少所需的版本,请尝试升级pyenv:cd/home/ubuntu/.pyenv/plugins/python build/./..&&git pull和&cd-((if(或(=“3.6.1”系统)(pyenv版本--bare | grep-x-q“'3.6.1”))(pyenv全局“3.6.1”)(chain和(pyenv安装--跳过现有的“3.6.1”)(pyenv全局“3.6.1”)(pyenv重新安装)(pip安装virtualenv)(pip安装前端)(pip安装pep8)(pyenv重新安装)))返回退出代码2操作失败:将python版本设置为3.6.1
添加
pre:-cd/opt/circleci/.pyenv;git pull
暂时解决了这个问题though@Inti看起来你可能在CircleCI上遇到了一个bug。这里是指向“我的全部”和“使用3.6.1”的链接。@Inti在OP的问题中,dependency install命令在
dependencies>pre
中配置,test runner命令在
test>post
中配置。我认为应该将它们配置为
依赖项>覆盖
测试>覆盖
,因为它们正在替换vs-augmenting Circle的推断命令。这可能会有所不同。