Issues installing Python3 and Pip in ubuntu in Docker

Issues installing Python3 and Pip in ubuntu in Docker

text

1) Download the Ubuntu image

docker pull ubuntu

2) View the image

docker images

3) Run the container

docker run -itd --name ubuntu-test ubuntu

4) Enter the container

sudo docker exec -it ubuntu-test /bin/bash

5) Update source

apt-get update

If you don't do this, you may run into the following problems:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package Python

Just run it once

6) Install python3

apt-get install python3

7) Install pip3

 apt-get install python3-pip

8) Testing

pip3 install numpy
Collecting numpy
 Downloading numpy-1.20.1-cp38-cp38-manylinux2010_x86_64.whl (15.4 MB)
   |███████████████████████████████████| 15.4 MB 1.9 MB/s
Installing collected packages: numpy
Successfully installed numpy-1.20.1

This is the end of this article about installing Python3 and Pip in Ubuntu in Docker. For more information about installing Python3 and Pip in Docker Ubuntu, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of installing Python 3.7 and pip3 in Ubuntu 16.04 and switching to the default version
  • How to install pip for python and python3 in ubuntu17.4
  • Python3 installation and pip source change and usage tutorial under win10 system
  • Tutorial on upgrading and installing python 3.8 and configuring pip and yum under Linux
  • Pip3 installation error in python3, no solution for SSL found
  • Detailed steps to install pip tool in Python3

<<:  Master the commonly used HTML tags for quoting content in web pages

>>:  How to uninstall MySQL cleanly (tested and effective)

Recommend

Nest.js hashing and encryption example detailed explanation

0x0 Introduction First of all, what is a hash alg...

A complete list of common Linux system commands for beginners

Learning Linux commands is the biggest obstacle f...

Detailed explanation of Javascript basics

Table of contents variable Data Types Extension P...

JavaScript to implement click to switch verification code and verification

This article shares the specific code of JavaScri...

Use nexus as a private library to proxy docker to upload and download images

1. Nexus configuration 1. Create a docker proxy U...

Implementation of MySQL joint index (composite index)

Joint Index The definition of the joint index in ...

Example code for converting Mysql query result set into JSON data

Mysql converts query result set into JSON data Pr...

Correct use of MySQL partition tables

Overview of MySQL Partitioned Tables We often enc...

How to use vue-bootstrap-datetimepicker date plugin in vue-cli 3

Demand Background Recently, I plan to use Vue and...

Detailed explanation of slave_exec_mode parameter in MySQL

Today I accidentally saw the parameter slave_exec...

User Experience Summary

Nowadays, whether you are working on software or w...

HTML version declaration DOCTYPE tag

When we open the source code of a regular website...