Coexistence of Python2 and 3 with CircleCI (1.0)

20171116 postscript

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

how to use

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)

Bad pattern

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

Coexistence of Python2 and 3 with CircleCI (1.0)
Coexistence of Fcitx and Zoom ~ With Japanese localization ~
Continuation of multi-platform development with Electron and Python
Example of reading and writing CSV with Python
Programming with Python and Tkinter
Encryption and decryption with Python
Python and hardware-Using RS232C with Python-
Automate python testing with CircleCI
Coexistence of pyenv and autojump
python with pyenv and venv
Works with Python and R
Easy partial download of mp4 with python and youtube-dl!
Visualize the range of interpolation and extrapolation with python
Comparison of CoffeeScript with JavaScript, Python and Ruby grammar
Version control of Node, Ruby and Python with anyenv
Communicate with FX-5204PS with Python and PyUSB
Environment construction of python and opencv
The story of Python and the story of NaN
Robot running with Arduino and python
Install Python 2.7.9 and Python 3.4.x with pip.
Neural network with OpenCV 3 and Python 3
AM modulation and demodulation with python
Installation of SciPy and matplotlib (Python)
[Python] font family and font with matplotlib
Scraping with Node, Ruby and Python
Perform isocurrent analysis of open channels with Python and matplotlib
Scraping with Python, Selenium and Chromedriver
Getting Started with Python Basics of Python
JSON encoding and decoding with python
Get rid of dirty data with Python and regular expressions
Detect objects of a specific color and size with Python
Hadoop introduction and MapReduce with Python
[GUI with Python] PyQt5-Drag and drop-
This and that of python properties
Life game with Python! (Conway's Game of Life)
Reading and writing NetCDF with Python
10 functions of "language with battery" python
I played with PyQt5 and Python3
Implementation of Dijkstra's algorithm with python
Sample of HTTP GET and JSON parsing with python of pepper
Easy modeling with Blender and Python
Summary of Python indexes and slices
Play with the password mechanism of GitHub Webhook and Python
Sugoroku game and addition game with python
FM modulation and demodulation with Python
Basic study of OpenCV with Python
Reputation of Python books and reference books
I compared the speed of Hash with Topaz, Ruby and Python
Speed comparison of Wiktionary full text processing with F # and Python
Manipulability ellipsoid of arm and mobile robot is drawn with python
Installation of Visual studio code and installation of python
Data pipeline construction with Python and Luigi
[Examples of improving Python] Learning Python with Codecademy
Calculate and display standard weight with python
FM modulation and demodulation with Python Part 3
[Automation] Manipulate mouse and keyboard with Python
Import of japandas with pandas 1.0 and above
Execute Python script with cron of TS-220
Passwordless authentication with RDS and IAM (Python)
Python installation and package management with pip
Using Python and MeCab with Azure Databricks