在docker镜像中安装python时遇到的问题

在docker镜像中安装python

    • 遇到的问题
    • 解决方法
    • 问题图片

遇到的问题

[root@969ad73676b7 /]# python3
bash: python3: command not found

Could not find a version that satisfies the requirement python3.6 (from versions: )
No matching distribution found for python
3.6
You are using pip version 18.1, however version 19.3.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.

解决方法

xxxxxxx@xxxxxxx-PC:~$ sudo docker run -it tensorflow421:latest /bin/bash
[root@969ad73676b7 /]# pip install --upgrade pip
yum install software-properties-common
yum install -y python3
yum install -y wget vim
wget -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py
python3 /tmp/get-pip.py
pip3 install --upgrade pip
python3 #启动python
pip3 install xxxxxxx(自己要安装的包和工具)

问题图片

在docker镜像中安装python时遇到的问题_第1张图片

你可能感兴趣的:(在docker镜像中安装python时遇到的问题)