How to Install python3 and pip in Alpine Linux

Puneet

 Alpine linux being most most lightweight and minimalistic version of linux is the most preferred os for resource constrain environment or containerised deployment like docker image / RKT.Alpine Linux is known for its security focused design  and small footprint.


You can tailor the OS according to your needs by installing packages.

By default ,Alpine Linux has apk package manager

for installing Python


install command doesn't work as we can use in ubuntu / Cent OS

apk install python


rather gives an error of 

ERROR: 'install' is not an apk command. See 'apk --help'.


you can avoid this error by using add instead of install

and you need to use python3 instead of just python

so ,command need to be

apk add python3

for installing pip along with python

apk add python3-pip 

also doesn't work rather you need to install py3-pip

so new command is

apk add py3-pip 


If you want to try alpine linux over browser consider using playground provided by KodeKloud.


If this post helped you ,consider donating to support research and publishing of new content on Primebuzzer .


Getting Info...

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.