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

前端之家收集整理的这篇文章主要介绍了Centos 7.4 安装ipython和mysql-python遇到的问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

Collectingipython==5.5.0
Downloadinghttp://mirrors.aliyun.com/pypi/packages/08/2c/6285504003b4eadce5540f3ee3adc081468b26723f3eef07d9d5d7d97ed8/ipython-5.5.0-py2-none-any.whl(758kB)
100%|████████████████████████████████|768kB3.9MB/s
Requirementalreadysatisfied:pygmentsin/usr/lib64/python2.7/site-packages(fromipython==5.5.0)
Requirementalreadysatisfied:setuptools>=18.5in/usr/lib/python2.7/site-packages(fromipython==5.5.0)
Requirementalreadysatisfied:backports.shutil-get-terminal-size;python_version=="2.7"in/usr/lib/python2.7/site-packages(fromipython==5.5.0)
Requirementalreadysatisfied:traitlets>=4.2in/usr/lib/python2.7/site-packages(fromipython==5.5.0)
Requirementalreadysatisfied:simplegeneric>0.8in/usr/lib/python2.7/site-packages(fromipython==5.5.0)
Collectingpickleshare(fromipython==5.5.0)
Downloadinghttp://mirrors.aliyun.com/pypi/packages/9f/17/daa142fc9be6b76f26f24eeeb9a138940671490b91cb5587393f297c8317/pickleshare-0.7.4-py2.py3-none-any.whl
Requirementalreadysatisfied:decoratorin/usr/lib/python2.7/site-packages(fromipython==5.5.0)
Collectingprompt-toolkit<2.0.0,>=1.0.4(fromipython==5.5.0)
Downloadinghttp://mirrors.aliyun.com/pypi/packages/d1/b0/1a6c262da35c779dd79550137aa7c298a424987240a28792ec5ccf48f848/prompt_toolkit-1.0.15-py2-none-any.whl(247kB)
100%|████████████████████████████████|256kB61.8MB/s
Requirementalreadysatisfied:pexpect;sys_platform!="win32"in/usr/lib/python2.7/site-packages(fromipython==5.5.0)
Collectingpathlib2;python_version=="2.7"orpython_version=="3.3"(fromipython==5.5.0)
Downloadinghttp://mirrors.aliyun.com/pypi/packages/74/4e/68add57f8b993bb5da70c22c7eebb4266c7b66cab15095a1578cc6a62b1a/pathlib2-2.3.0-py2.py3-none-any.whl
Requirementalreadysatisfied:ipython-genutilsin/usr/lib/python2.7/site-packages(fromtraitlets>=4.2->ipython==5.5.0)
Requirementalreadysatisfied:enum34;python_version=="2.7"in/usr/lib/python2.7/site-packages(fromtraitlets>=4.2->ipython==5.5.0)
Requirementalreadysatisfied:sixin/usr/lib/python2.7/site-packages(fromtraitlets>=4.2->ipython==5.5.0)
Collectingwcwidth(fromprompt-toolkit<2.0.0,>=1.0.4->ipython==5.5.0)
Downloadinghttp://mirrors.aliyun.com/pypi/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/wcwidth-0.1.7-py2.py3-none-any.whl
Collectingscandir;python_version<"3.5"(frompathlib2;python_version=="2.7"orpython_version=="3.3"->ipython==5.5.0)
Downloadinghttp://mirrors.aliyun.com/pypi/packages/77/3f/916f524f50ee65e3f465a280d2851bd63685250fddb3020c212b3977664d/scandir-1.6.tar.gz
Installingcollectedpackages:scandir,pathlib2,pickleshare,wcwidth,prompt-toolkit,ipython
Runningsetup.pyinstallforscandir...error
Completeoutputfromcommand/usr/bin/python2-u-c"importsetuptools,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:
runninginstall
runningbuild
runningbuild_py
creatingbuild
creatingbuild/lib.linux-x86_64-2.7
copyingscandir.py->build/lib.linux-x86_64-2.7
runningbuild_ext
building'_scandir'extension
creatingbuild/temp.linux-x86_64-2.7
gcc-pthread-fno-strict-aliasing-O2-g-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-g-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-obuild/temp.linux-x86_64-2.7/_scandir.o
_scandir.c:14:20:fatalerror:Python.h:Nosuchfileordirectory
#include<Python.h>
^
compilationterminated.
error:command'gcc'Failedwithexitstatus1
----------------------------------------
Command"/usr/bin/python2-u-c"importsetuptools,'exec'))"install--record/tmp/pip-XwbXPl-record/install-record.txt--single-version-externally-managed--compile"Failedwitherrorcode1in/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

原文链接:https://www.f2er.com/centos/375098.html

猜你在找的CentOS相关文章