admin管理员组文章数量:1794759
在ubuntu系统下安装python
一、背景介绍
随着本人python使用的越来越多,跑的代码和程序越来越复杂,从git下载代码也更多的需要liux系统才能使用,所以考虑在ubuntu系统下安装python,此博文也是基于CSDN7天培训的一些需要去做的,更多的方便记录安装流程以及出现问题的解决方案。 首先需要安装ubuntu系统,具体软件请参考博客:blog.csdn/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 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: hub.docker/ For more examples and ideas, visit: docs.docker/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.下载安装包网址:www.jetbrains/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.清华大学开源软件镜像站下载mirrors.tuna.tsinghua.edu/help/anaconda/ 2.选择合适的版本下载 3.找到对应的文件 4.命令行输入指令
bash Anaconda3-5.2.0-Linux-x86_64.sh 注意版本5.遇到提示,输入yes,然后回车
5.3 anacnoda.navigator 参考博客:[1]www.runoob/docker/ubuntu-docker-install.html [2]blog.csdn/xinyan233/article/details/80369061 [3]blog.csdn/zhuanshu666/article/details/73554885 [4]jingyan.baidu/article/c45ad29c030102051753e20f.html [5]blog.csdn/x1987200567/article/details/104348055
版权声明:本文标题:在ubuntu系统下安装python 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686774667a101129.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论