Centos 7.4 安装ipython和mysql-python遇到的问题

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 RDS PostgreSQL,集群系列 2核4GB
简介:

pip安装ipython报错记录
#pip install ipython==5.5.0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Collecting ipython = = 5.5 . 0
   Downloading http: / / mirrors.aliyun.com / pypi / packages / 08 / 2c / 6285504003b4eadce5540f3ee3adc081468b26723f3eef07d9d5d7d97ed8 / ipython - 5.5 . 0 - py2 - none - any .whl ( 758kB )
     100 %  |████████████████████████████████|  768kB  3.9MB / s
Requirement already satisfied: pygments  in  / usr / lib64 / python2. 7 / site - packages ( from  ipython = = 5.5 . 0 )
Requirement already satisfied: setuptools> = 18.5  in  / usr / lib / python2. 7 / site - packages ( from  ipython = = 5.5 . 0 )
Requirement already satisfied: backports.shutil - get - terminal - size; python_version  = =  "2.7"  in  / usr / lib / python2. 7 / site - packages ( from  ipython = = 5.5 . 0 )
Requirement already satisfied: traitlets> = 4.2  in  / usr / lib / python2. 7 / site - packages ( from  ipython = = 5.5 . 0 )
Requirement already satisfied: simplegeneric> 0.8  in  / usr / lib / python2. 7 / site - packages ( from  ipython = = 5.5 . 0 )
Collecting pickleshare ( from  ipython = = 5.5 . 0 )
   Downloading http: / / mirrors.aliyun.com / pypi / packages / 9f / 17 / daa142fc9be6b76f26f24eeeb9a138940671490b91cb5587393f297c8317 / pickleshare - 0.7 . 4 - py2.py3 - none - any .whl
Requirement already satisfied: decorator  in  / usr / lib / python2. 7 / site - packages ( from  ipython = = 5.5 . 0 )
Collecting prompt - toolkit< 2.0 . 0 ,> = 1.0 . 4  ( from  ipython = = 5.5 . 0 )
   Downloading http: / / mirrors.aliyun.com / pypi / packages / d1 / b0 / 1a6c262da35c779dd79550137aa7c298a424987240a28792ec5ccf48f848 / prompt_toolkit - 1.0 . 15 - py2 - none - any .whl ( 247kB )
     100 %  |████████████████████████████████|  256kB  61.8MB / s
Requirement already satisfied: pexpect; sys_platform ! =  "win32"  in  / usr / lib / python2. 7 / site - packages ( from  ipython = = 5.5 . 0 )
Collecting pathlib2; python_version  = =  "2.7"  or  python_version  = =  "3.3"  ( from  ipython = = 5.5 . 0 )
   Downloading http: / / mirrors.aliyun.com / pypi / packages / 74 / 4e / 68add57f8b993bb5da70c22c7eebb4266c7b66cab15095a1578cc6a62b1a / pathlib2 - 2.3 . 0 - py2.py3 - none - any .whl
Requirement already satisfied: ipython - genutils  in  / usr / lib / python2. 7 / site - packages ( from  traitlets> = 4.2 - >ipython = = 5.5 . 0 )
Requirement already satisfied: enum34; python_version  = =  "2.7"  in  / usr / lib / python2. 7 / site - packages ( from  traitlets> = 4.2 - >ipython = = 5.5 . 0 )
Requirement already satisfied: six  in  / usr / lib / python2. 7 / site - packages ( from  traitlets> = 4.2 - >ipython = = 5.5 . 0 )
Collecting wcwidth ( from  prompt - toolkit< 2.0 . 0 ,> = 1.0 . 4 - >ipython = = 5.5 . 0 )
   Downloading http: / / mirrors.aliyun.com / pypi / packages / 7e / 9f / 526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe / wcwidth - 0.1 . 7 - py2.py3 - none - any .whl
Collecting scandir; python_version <  "3.5"  ( from  pathlib2; python_version  = =  "2.7"  or  python_version  = =  "3.3" - >ipython = = 5.5 . 0 )
   Downloading http: / / mirrors.aliyun.com / pypi / packages / 77 / 3f / 916f524f50ee65e3f465a280d2851bd63685250fddb3020c212b3977664d / scandir - 1.6 .tar.gz
Installing collected packages: scandir, pathlib2, pickleshare, wcwidth, prompt - toolkit, ipython
   Running setup.py install  for  scandir ... error
     Complete output  from  command  / usr / bin / python2  - - "import setuptools, tokenize;__file__='/tmp/pip-build-Ezagxu/scandir/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"  install  - - record  / tmp / pip - XwbXPl - record / install - record.txt  - - single - version - externally - managed  - - compile :
     running install
     running build
     running build_py
     creating build
     creating build / lib.linux - x86_64 - 2.7
     copying scandir.py  - > build / lib.linux - x86_64 - 2.7
     running build_ext
     building  '_scandir'  extension
     creating build / temp.linux - x86_64 - 2.7
     gcc  - pthread  - fno - strict - aliasing  - O2  - - pipe  - Wall  - Wp, - D_FORTIFY_SOURCE = 2  - fexceptions  - fstack - protector - strong  - - param = ssp - buffer - size = 4  - grecord - gcc - switches  - m64  - mtune = generic  - D_GNU_SOURCE  - fPIC  - fwrapv  - DNDEBUG  - O2  - - pipe  - Wall  - Wp, - D_FORTIFY_SOURCE = 2  - fexceptions  - fstack - protector - strong  - - param = ssp - buffer - size = 4  - grecord - gcc - switches  - m64  - mtune = generic  - D_GNU_SOURCE  - fPIC  - fwrapv  - fPIC  - I / usr / include / python2. 7  - c _scandir.c  - o build / temp.linux - x86_64 - 2.7 / _scandir.o
     _scandir.c: 14 : 20 : fatal error: Python.h: No such  file  or  directory
      #include <Python.h>
                         ^
     compilation terminated.
     error: command  'gcc'  failed with exit status  1
     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command  "/usr/bin/python2 -u -c " import  setuptools, tokenize;__file__ = '/tmp/pip-build-Ezagxu/scandir/setup.py' ;f = getattr (tokenize,  'open' open )(__file__);code = f.read().replace( '\r\n' '\n' );f.close(); exec ( compile (code, __file__,  'exec' )) " install --record /tmp/pip-XwbXPl-record/install-record.txt --single-version-externally-managed --compile"  failed with error code  1  in  / tmp / pip - build - Ezagxu / scandir /

解决方法:
yum install python-devel libxslt-devel libffi-devel openssl-devel gcc gcc-c++ kernel-devel


CentOS7安装MySQL-python出错

解决方法:

yum install python-devel mysql-devel zlib-devel openssl-deve


资料:https://www.92ez.com/?action=show&id=23431


本文转自 boy461205160 51CTO博客,原文链接:http://blog.51cto.com/461205160/2047763


相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
21天前
|
消息中间件 Linux API
centos7 安装rabbitmq自定义版本及配置
centos7 安装rabbitmq自定义版本及配置
|
1天前
|
项目管理 Python
如何在Mac上安装多个Python环境
在你的Mac上使用多个Python环境可以对项目管理很有帮助,特别是在同时处理不同Python版本或不同的包需求时。在这篇文章中,我们将向你展示如何在Mac上轻松地安装和管理多个Python环境。
10 5
 如何在Mac上安装多个Python环境
|
20天前
|
弹性计算 关系型数据库 MySQL
centos7 mysql安装及配置
本文详细介绍了在阿里云服务器ECS上通过yum源安装MySQL 8.0.12的过程,包括更新yum源、下载并安装MySQL源、解决安装过程中可能遇到的问题等步骤。此外,还介绍了如何启动MySQL服务、设置开机自启、配置登录密码、添加远程登录用户以及处理远程连接异常等问题。适合初学者参考,帮助快速搭建MySQL环境。
102 8
centos7 mysql安装及配置
|
16天前
|
存储 Linux Docker
CentOS 7.6安装Docker实战案例及存储引擎和服务进程简介
关于如何在CentOS 7.6上安装Docker、介绍Docker存储引擎以及服务进程关系的实战案例。
59 3
CentOS 7.6安装Docker实战案例及存储引擎和服务进程简介
|
4天前
|
Python Windows
安装Python环境
安装Python环境
17 8
|
21天前
|
Linux 开发工具 C语言
centos7编译安装python3
centos7编译安装python3
|
21天前
|
分布式计算 资源调度 Hadoop
centos7二进制安装Hadoop3
centos7二进制安装Hadoop3
|
21天前
|
Linux Python
Centos7安装Python虚拟环境之virtualenv
Centos7安装Python虚拟环境之virtualenv
|
4天前
|
存储 SQL 关系型数据库
使用MySQL Workbench进行数据库备份
【9月更文挑战第13天】以下是使用MySQL Workbench进行数据库备份的步骤:启动软件后,通过“Database”菜单中的“管理连接”选项配置并选择要备份的数据库。随后,选择“数据导出”,确认导出的数据库及格式(推荐SQL格式),设置存储路径,点击“开始导出”。完成后,可在指定路径找到备份文件,建议定期备份并存储于安全位置。
57 11