python, alpine linux,

Install Python on Alpine Linux

Sep 26, 2022 · 1 min read · Post a comment

Today I’m going to show you how to install python on alpine linux without using a python image. You can get into the Alpine terminal and install python3 and python3-pip directly.

Prerequisites

  • Alpine Linux
  • sudo privileges

Install Python on Alpine Linux

Step 1. First, install python3.

sudo apk add --update --no-cache python3

Step 2. Create symlink.

ln -sf python3 /usr/bin/python

Step 3. The ensurepip package is used for bootstrapping the pip installer into an existing Python installation.

python3 -m ensurepip

Step 4. Run pip3 dependencies.

pip3 install --no-cache --upgrade pip setuptools

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.