Python安装

Python安装与ipython配置
本文介绍了Python在不同操作系统下的安装方法,包括Windows和Linux,并详细记录了在Linux环境下安装ipython的过程及其常见问题解决办法。

Python学习方法

这里写图片描述

Python安装

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

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

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

在linux下安装:

linux下其实是自带Python

[root@shuai-01 ~]# rpm -q python
python-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-release
epel-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.0

Installing collected packages: wcwidth, prompt-toolkit, ptyprocess, pexpect, scandir, pathlib2, pickleshare, ipython
  Running setup.py install for scandir ... done
Successfully 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值