Use Python 3.6.0 in circleci

I am starting a new project with python 3.6 and I want to bind circleci to my project.

my 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

and error 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 doesn't seem to support the latest version of pyenv.

How to fix it?

+4
source share
2 answers

You can use Python 3.6.0 in CircleCI (default is Ubuntu 14.04) right now, having the following in circle.yml:

machine:                                                                                                                                                                 
  pre:                                                                                                                                                                   
    - cd /opt/circleci/.pyenv; git pull                                                                                                                                  
  python:                                                                                                                                                                
    version: 3.6.0

What you are now backing down is about 2 minutes of build time. This is a workaround if you NEED 3.6.0 until a new CCI image of Ubuntu 14.04 appears in the next 3 weeks or so.

+5
source

, , CircleCI , Python 3.6.1. , circle.yml 3.6.1:

machine:
  python:
    version: 3.6.1

...
+1

Source: https://habr.com/ru/post/1665241/


All Articles