Build-image: Pip installation should support Python3

Created on 29 Dec 2019  路  4Comments  路  Source: netlify/build-image

Hello! =)

A component of my website is composed of python3 files and they have dependencies. When I try to pip3 install those dependencies, the deploy logs note that pip3 is not available.

This has been noted in this issue as well: https://github.com/netlify/build-image/issues/240.

I hack around this atm by pulling down get-pip.py and installing it locally with python3, but this does not take advantage of the great caching stuff you do. I think python3-pip should be part of the default image, especially considering that Python 2.7 is being end-of-life'd.

All 4 comments

@anjakefala I figured this out a bit earlier today: you can specify the Python version with runtime.txt or Pipfile (it looks like 2.7, 3.5, and 3.7 are the supported values). If you choose a 3.x version, you get python3 and pip3 executables.

Thanks! @duckinator ^^

I can confirm that this worked for me. Thanks @duckinator!

Thanks! I was looking for this. Just to make 100% clear.
Create the runtime.txt** file in the root of the project and fill it out with one of the options:

3.5
3.7

It took me some time to understand it's different than heroku

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arcanis picture arcanis  路  7Comments

sileht picture sileht  路  6Comments

depadiernos picture depadiernos  路  6Comments

danurbanowicz picture danurbanowicz  路  8Comments

SeanKilleen picture SeanKilleen  路  11Comments