The following description is about Circle CI 1.0 series This does not apply to 2.0 as it has a completely different mechanism.
circle.yml It's OK if you write pyenv in both versions in the machine section The supported version is here
machine:
post:
- pyenv global 2.7.11 3.6.1
If you add 3 after the python and pip commands, it will be executed in 3 series.
ubuntu@box832:~$ python -V
Python 2.7.11
ubuntu@box832:~$ python3 -V
Python 3.6.1
ubuntu@box832:~$ pip -V
pip 7.1.2 from /opt/circleci/python/2.7.11/lib/python2.7/site-packages (python 2.7)
ubuntu@box832:~$ pip3 -V
pip 9.0.1 from /opt/circleci/python/3.6.1/lib/python3.6/site-packages (python 3.6)
If you specify the following, it will be executed in the virtual environment of only 3 series, so commands that require 2 series (such as appcfg.py of GAE) will fail.
machine:
python:
version: 3.6.1
Recommended Posts