I need cpython 3.7 in alpine linux 3.13. I cannot find any way to install it or build it.

I have to have python3.8 (the standard from the repos) installed as well. I only need python3.7 in order to create python3.7 pyc files. Attempting to manually add the alpine v3.10 python3 package apk fails because it cannot find deps. Using "--force-broken-world" results in python3.8 being uninstalled along with all its dependents.

Trying to build from source, I just get "compiler cannot create executables" when running configure. Clang is installed. "export CC=/usr/bin/clang" has no effect.

1 Answer 1


I tried using the APKBUILD script from alpine aports. Configure still wasn't working. I figured out that I needed to install g++, ie. the gcc package wasn't enough.

apk add g++

Then configure worked. And abuild build was able to finish.

I also figured out that apk files are just tar.gz files with some extra metadata. Extracting it manually works fine to force an install.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .