Python安装

来源:互联网 发布:天津淘宝商会会长 编辑:程序博客网 时间:2024/06/05 19:12

Python学习方法

这里写图片描述

Python安装

Python是跨平台的,在Windows,linux,Mac,都可以用。

Windows下安装:下载完后跟着这篇文章做就行。

https://jingyan.baidu.com/article/8cdccae97f7d26315413cd88.html

在linux下安装:

linux下其实是自带Python

[root@shuai-01 ~]# rpm -q pythonpython-2.7.5-48.el7.x86_64

装一个ipython的软件包,能让linux的Python更好用。
安装ipython软件包要通过pip来安装,而pip又是在epel-release源里。就要先安装epel-release源,在安装Python-pip包,再安装ipyhton.

安装的epel-release源

[root@shuai-01 ~]# yum list |grep epel-releaseepel-release.noarch                       7-11                         @epel

安装Python-pip

[root@shuai-01 ~]# yum install python-pip

安装ipython5.3.0

[root@shuai-01 ~]# pip install ipython==5.3.0Installing collected packages: wcwidth, prompt-toolkit, ptyprocess, pexpect, scandir, pathlib2, pickleshare, ipython  Running setup.py install for scandir ... doneSuccessfully installed ipython-5.3.0 pathlib2-2.3.0 pexpect-4.3.1 pickleshare-0.7.4 prompt-toolkit-1.0.15 ptyprocess-0.5.2 scandir-1.6 wcwidth-0.1.7

安装成功。

问题1:

ipython所适用的Python软件版本不一样,这样可能会导致安装不上,指定版本号安装。

问题2:

这里写图片描述

报错_scandir.c:14:20: 致命错误:Python.h:没有那个文件或目录,#include