在ubuntu系统下安装python

在ubuntu系统下安装python

一、背景介绍

随着本人python使用的越来越多,跑的代码和程序越来越复杂,从git下载代码也更多的需要liux系统才能使用,所以考虑在ubuntu系统下安装python,此博文也是基于CSDN7天培训的一些需要去做的,更多的方便记录安装流程以及出现问题的解决方案。
首先需要安装ubuntu系统,具体软件请参考博客:https://blog.csdn.net/wp215501547/article/details/103665646

二、安装docker

2.1 docker是什么?

Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的镜像中,然后发布到任何流行的 Linux或Windows 机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口(百度搜索结果,也是不太理解,先安装再说)

2.1安装crul

为了安装docker,需要安装crul,命令如下:

sudo apt install curl

但是报错了
在这里插入图片描述
解决方案:

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock

在这里插入图片描述

2.2安装docker

安装docker命令如下:

curl -sSL https://get.daocloud.io/docker | sh

在这里插入图片描述

2.3测试 Docker 是否安装成功

输入以下指令,打印出以下信息则安装成功:

$ sudo docker run hello-world

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete                                                                                                                                  Digest: sha256:c3b4ada4687bbaa170745b3e4dd8ac3f194ca95b2d0518b417fb47e5879d9b5f
Status: Downloaded newer image for hello-world:latest


Hello from Docker!
This message shows that your installation appears to be working correctly.


To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.


To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash


Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/


For more examples and ideas, visit:
 https://docs.docker.com/get-started/

三、安装python

3.1 python安装命令

命令行中输入sudo passwd ,输入密码,进入超级管理员模式
在系统中,打开终端命令行,按下面代码一行行输入即可

sudo apt-get install python
sudo apt-get install python-dev
sudo apt-get install python-pip
sudo apt-get install libxml*
sudo apt-get install net-tools
sudo apt-get install lsof

完成之后,在命令行中输入python3,结果如下,表示安装完成
在这里插入图片描述

3.2 python测试

命令行输入python,进行测试在这里插入图片描述

四、安装pycharm

3.1 pycharm安装

1.下载安装包

网址:https://www.jetbrains.com/pycharm/download/#section=linux
选择对应的版本和系统就可以
在这里插入图片描述

2.解压

下载后找到下载文件,选择Extract Here,解压到当前,目录
在这里插入图片描述
在这里插入图片描述

3.安装

使用cd命令,进入解压好的文件夹,进入bin文件夹,对应的文件路径,运行sh ./pycharm.sh,按步骤操作就可以。

3.2 pycharm显示

在这里插入图片描述

五、安装anacnoda

5.1 anacnoda是什么

Anaconda指的是一个开源的Python发行版本,其包含了conda、Python等180多个科学包及其依赖项。因为包含了大量的科学包,Anaconda 的下载文件比较大(约 531 MB),如果只需要某些包,或者需要节省带宽或存储空间,也可以使用Miniconda这个较小的发行版(仅包含conda和 Python)。

5.2 anacnoda安装

1.清华大学开源软件镜像站下载https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
2.选择合适的版本下载
3.找到对应的文件
4.命令行输入指令

bash Anaconda3-5.2.0-Linux-x86_64.sh
注意版本

5.遇到提示,输入yes,然后回车

5.3 anacnoda.navigator

在这里插入图片描述

参考博客:

[1]https://www.runoob.com/docker/ubuntu-docker-install.html
[2]https://blog.csdn.net/xinyan233/article/details/80369061
[3]https://blog.csdn.net/zhuanshu666/article/details/73554885
[4]https://jingyan.baidu.com/article/c45ad29c030102051753e20f.html
[5]https://blog.csdn.net/x1987200567/article/details/104348055

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/114455.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • python创建学生管理系统_学员管理系统 培训机构

    python创建学生管理系统_学员管理系统 培训机构使用面向对象完成了学员管理系统,实现了添加、删除、修改、查询、保存读取等功能。将学员、学员管理后台、开始入口分为了3个py文件,分别是Student.py、Student_management.py、main.py。保存文件名叫student.txt文件。内含注释,我也是给初学者,可能有些地方解释不清楚。Student.py代码如下#定义学生的类classStudent(object):def__init__(self,name,gender,number):

    2022年9月16日
    3
  • 博弈论(Game Theory)入门学习笔记(持续更新)

    博弈论(Game Theory)入门学习笔记(持续更新)博弈论(GameTheory)入门学习笔记课程介绍1-1Taste-Backoff1-2Self-InterestedAgentsandUtilityTheory1-3Define1-4Examples1-5NashEquilibriumIntro1-6StrategicReasoning课程介绍博弈论,又称对策论,是使用严谨的数学模型研究冲突对抗条件下最优决策问题的理论,是研究竞争的逻辑和规律的数学分支。1-1Taste-Backoff以一个经典案例引出博弈论

    2022年10月15日
    2
  • 50.3. Partitioning

    50.3. Partitioning

    2022年3月12日
    33
  • Linux中安装tree命令

    Linux中安装tree命令在CentOS系统的普通用户下,使用sudoyum-yinstalltree下载tree命令,在ubuntu系统的普通用户下,使用sudoapt-getinstalltree下载tree命令

    2022年7月24日
    10
  • 中小型企业局域网设计

    中小型企业局域网设计中小型企业局域网设计                                                        引言 ………………………………………………………………………………2一、公司简介………………………………………………………………………3二、企业需求分析…………………………………………………………………3三、总体设计方案…………………………………

    2022年7月12日
    19
  • 两个向量的夹角公式_向量的夹角公式!急急急!!!「建议收藏」

    两个向量的夹角公式_向量的夹角公式!急急急!!!「建议收藏」展开全部平面向量夹角公式:cos=(ab的内积)/(|a||b|)(1)上部分:a与b的数量积坐标运算:设a=(x1,y1),b=(x2,y2),则a·b=x1x2+y1y2(2)下部分:是32313133353236313431303231363533e58685e5aeb931333431373139a与b的模的乘积:设a=(x1,y1),b=(x2,y2),则(|a||b|)=根号下(x1平…

    2022年10月21日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号