Register Now

Improved Python Version Management and Caching on Codeship Basic

Codeship Basic

Reading Time: 1 minute

We’re excited to announce that we’ve Improved version management and caching for Python on Codeship Basic. You don’t need to change anything right now for existing projects, but you may need to update your configuration to make use of the new functionality.

The main change to version management is that we’re switching from virtualenv to pyenv and no longer rely on the default Ubuntu versions. Virtualenv will continue to work, but you’ll find it easier and quicker to switch to pyenv. To use pyenv, you can either set PYENV_VERSION (instead of PYTHON_VERSION) to your desired version, or put the version in a .python-version file and check that into your repo. We’ll make sure to use the correct version, as long as that version is installed. If you are using a version that is not installed, you will need to install it in your setup commands. By default, the following versions are pre-installed: 2.7.13, 3.4.6, 3.5.3, 3.6.1 though we recommend you specify minor versions (e.g. 3.5) to get patch updated without having to update your setup script every time.

Sign up for a free Codeship Account

You can still install other versions if you’d like; just specify that version in the variable/file and we’ll take it from there. No more scripts or other workarounds.

The new caching is even easier; it’s on by default and you don’t have to change anything. Any dependency you install via pip will automatically be cached between builds.

Naturally, all of this is also explained in our documentation where you can also learn more about how the caching works.

Subscribe via Email

Over 60,000 people from companies like Netflix, Apple, Spotify and O'Reilly are reading our articles.
Subscribe to receive a weekly newsletter with articles around Continuous Integration, Docker, and software development best practices.

We promise that we won't spam you. You can unsubscribe any time.

Join the Discussion

Leave us some comments on what you think about this topic or if you like to add something.