Python2.7装依赖包PyYAML报错,请大家帮忙看一下
[root@localhostPyYAML-3.11]#pythonsetup.pyinstallrunninginstallrunningbuildrunningbui...
[root@localhost PyYAML-3.11]# python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/cyaml.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/serializer.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/scanner.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/loader.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/emitter.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/events.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/composer.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/resolver.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/nodes.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/__init__.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/parser.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/reader.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/dumper.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/tokens.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/error.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/constructor.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/representer.py -> build/lib.linux-x86_64-2.7/yaml
running build_ext
creating build/temp.linux-x86_64-2.7
checking if libyaml is compilable
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 build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o
build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
#include <yaml.h>
^
compilation terminated.
libyaml is not found or a compiler error: forcing --without-libyaml
(if libyaml is installed correctly, you may need to
specify the option --include-dirs or uncomment and
modify the parameter include_dirs in setup.cfg)
running install_lib
running install_egg_info
Removing /usr/lib64/python2.7/site-packages/PyYAML-3.11-py2.7.egg-info
Writing /usr/lib64/python2.7/site-packages/PyYAML-3.11-py2.7.egg-info
[root@localhost PyYAML-3.11]#
这到底是什么错呢 展开
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/cyaml.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/serializer.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/scanner.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/loader.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/emitter.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/events.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/composer.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/resolver.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/nodes.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/__init__.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/parser.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/reader.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/dumper.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/tokens.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/error.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/constructor.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/representer.py -> build/lib.linux-x86_64-2.7/yaml
running build_ext
creating build/temp.linux-x86_64-2.7
checking if libyaml is compilable
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 build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o
build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
#include <yaml.h>
^
compilation terminated.
libyaml is not found or a compiler error: forcing --without-libyaml
(if libyaml is installed correctly, you may need to
specify the option --include-dirs or uncomment and
modify the parameter include_dirs in setup.cfg)
running install_lib
running install_egg_info
Removing /usr/lib64/python2.7/site-packages/PyYAML-3.11-py2.7.egg-info
Writing /usr/lib64/python2.7/site-packages/PyYAML-3.11-py2.7.egg-info
[root@localhost PyYAML-3.11]#
这到底是什么错呢 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询