在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/114563.html原文链接:https://javaforall.net

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


相关推荐

  • anaconda pycharm设置编译器_anaconda默认环境

    anaconda pycharm设置编译器_anaconda默认环境Pycharm是一个非常好用的Python编译运行IDE,anaconda则用于管理Python中各种有用的包。下面讲讲在Ubuntu系统下让Pycharm能够使用anaconda管理的各种包。1找到编译器选项首先打开Pycharm然后点击File->settings,然后就可以看到下图所示界面:…

    2022年8月28日
  • 滑动窗口算法通用思想

    滑动窗口算法通用思想本文详解「滑动窗口」这种高级双指针技巧的算法框架,带你秒杀几道难度较大的子字符串匹配问题:最小覆盖子串找到字符串中所有字母异位词无重复字符的最长子串最后抽象出一个简单的滑动窗口算法框架。LeetCode上至少有9道题目可以用此方法高效解决。但是有几道是VIP题目,有几道题目虽不难但太复杂,所以本文只选择点赞最高,较为经典的,最能够讲明白的三道题来讲解。第一题为了让读者掌握算法模…

    2022年10月29日
  • Codeforces Round #FF (Div. 2):C. DZY Loves Sequences[通俗易懂]

    Codeforces Round #FF (Div. 2):C. DZY Loves Sequences

    2022年1月25日
  • Ubuntu18安装Edge

    Ubuntu18安装Edge1、通过以具有sudo特权的用户身份运行以下命令来更新程序包索引并安装依赖项:sudoaptupdatesudoaptinstallsoftware-properties-commonapt-transport-httpswget2、使用以下命令导入MicrosoftGPG密钥wget:wget-qhttps://packages.microsoft.com/keys/microsoft.asc-O-|sudoapt-keyadd-3、并通过键入以下命令启用Ed

    2022年7月21日
  • mysql操作

    mysql操作

    2022年4月2日
  • 004 JVM调优工具_arthas(阿尔萨斯)

    004 JVM调优工具_arthas(阿尔萨斯)https://alibaba.github.io/arthas/Arthas是Alibaba开源的Java诊断工具,其安装应用非常简单,功能非常强大;1.安装:推荐使用arthas-boot下载arthas-boot.jar:curl-Ohttps://alibaba.github.io/arthas/arthas-boot.jarjava-jararthas-bo…

    2022年5月29日

发表回复

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

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