linux 安装pyqt

来源:互联网 发布:收货人 余杭嘉云淘宝 编辑:程序博客网 时间:2024/05/29 18:17

最近要做一个依赖tensorflow任务的页面展示的功能,需要安装PyQt4和tensorflow,查看了很多教程,如下
http://www.jianshu.com/p/7mqAmr
但是都会出现 下面类似的错误(来自网络,没有截图)

tyler@ubuntu:~/sip41$ sudo makemake[1]: Entering directory `/home/tyler/sip41/sipgen'make[1]: Nothing to be done for `all'.make[1]: Leaving directory `/home/tyler/sip41/sipgen'make[1]: Entering directory `/home/tyler/sip41/siplib'gcc -c -pipe -fPIC -O2 -w -DNDEBUG -I. -I/usr/include/python3.2mu -o siplib.o siplib.csiplib.c:20:20: fatal error: Python.h: No such file or directorycompilation terminated.make[1]: *** [siplib.o] Error 1make[1]: Leaving directory `/home/tyler/sip41/siplib'make: *** [all] Error 2

有经过安装
yum install gcc yum install python-dev都无济于事

最后决定安装Anaconda2-2.4.0-Linux-x86_64(我的centos7是64位),安装好后输入以下命令,让系统的Python指向anaconda的Python版本。
这里写图片描述

然后安装tensorflow,pip install –no-cache-dir tensorflow

原创粉丝点击