本文地址http://www.cnblogs.com/yhLinux/p/4063444.html

$ sudo easy_install sqlalchemy
[sudo] password for ovonel:
Searching for sqlalchemy
Reading http://pypi.python.org/simple/sqlalchemy/
Best match: SQLAlchemy 0.9.
Downloading https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.9.8.tar.gz#md5=470ca4da4a0081efc830f0d90dd91682
Processing SQLAlchemy-0.9..tar.gz
Running SQLAlchemy-0.9./setup.py -q bdist_egg --dist-dir /tmp/easy_install-niIczD/SQLAlchemy-0.9./egg-dist-tmp-K7Kb1x
warning: no files found matching '*.jpg' under directory 'doc'
warning: no files found matching 'distribute_setup.py'
warning: no files found matching 'sa2to3.py'
warning: no files found matching 'ez_setup.py'
no previously-included directories found matching 'doc/build/output'
lib/sqlalchemy/cextension/processors.c::: 致命错误: Python.h:没有那个文件或目录
编译中断。

出现这个问题的原因是,系统中的python是自带的,而没有安装python的开发包并没有安装,

所以在shell下执行如下命令:

$ sudo apt-get install python-dev
$ sudo easy_install sqlalchemy
Searching for sqlalchemy
Reading http://pypi.python.org/simple/sqlalchemy/
Best match: SQLAlchemy 0.9.
Downloading https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.9.8.tar.gz#md5=470ca4da4a0081efc830f0d90dd91682
Processing SQLAlchemy-0.9..tar.gz
Running SQLAlchemy-0.9./setup.py -q bdist_egg --dist-dir /tmp/easy_install-Nu0lzS/SQLAlchemy-0.9./egg-dist-tmp-R1tVSz
warning: no files found matching '*.jpg' under directory 'doc'
warning: no files found matching 'distribute_setup.py'
warning: no files found matching 'sa2to3.py'
warning: no files found matching 'ez_setup.py'
no previously-included directories found matching 'doc/build/output'
zip_safe flag not set; analyzing archive contents...
sqlalchemy.testing.plugin.noseplugin: module references __file__
Adding SQLAlchemy 0.9. to easy-install.pth file Installed /usr/local/lib/python2./dist-packages/SQLAlchemy-0.9.-py2.-linux-x86_64.egg
Processing dependencies for sqlalchemy
Finished processing dependencies for sqlalchemy

缷载easy_install安装的包

(个人感觉easy_install没有pip方便,推荐大家使用pip安装和缷载https://pypi.python.org/pypi/pip

如何缷载esay_install安装的sqlalchemy呢,这里是官方文档:

https://pythonhosted.org/setuptools/easy_install.html#uninstalling-packages

$ sudo easy_install -m sqlalchemy
Searching for sqlalchemy
Best match: SQLAlchemy 0.9.
Processing SQLAlchemy-0.9.-py2..egg Using /usr/local/lib/python2./dist-packages/SQLAlchemy-0.9.-py2..egg Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version: pkg_resources.require("SQLAlchemy") # latest installed version
pkg_resources.require("SQLAlchemy==0.9.8") # this exact version
pkg_resources.require("SQLAlchemy>=0.9.8") # this version or higher Processing dependencies for sqlalchemy
Finished processing dependencies for sqlalchemy $ sudo easy_install -m SQLAlchemy==0.9.
Searching for SQLAlchemy==0.9.
Best match: SQLAlchemy 0.9.
Processing SQLAlchemy-0.9.-py2..egg Using /usr/local/lib/python2./dist-packages/SQLAlchemy-0.9.-py2..egg Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version: pkg_resources.require("SQLAlchemy") # latest installed version
pkg_resources.require("SQLAlchemy==0.9.8") # this exact version
pkg_resources.require("SQLAlchemy>=0.9.8") # this version or higher Processing dependencies for SQLAlchemy==0.9.
Finished processing dependencies
for SQLAlchemy==0.9. $ sudo rm /usr/local/lib/python2./dist-packages/SQLAlchemy-0.9.-py2..egg/ -r

(完)

lib/sqlalchemy/cextension/processors.c:10:20: 致命错误: Python.h:没有那个文件或目录的更多相关文章

  1. ubuntu 致命错误: zlib.h:没有那个文件或目录【转】

    本文转载自:https://blog.csdn.net/u013359794/article/details/44922685?locationnum=15&fps=1 编译时,出现错误,提示 ...

  2. _mysql.c:29:20: error: Python.h: No such file or directory

    在Centos系统中安装 pip install MySQL-python 提示: _mysql.c:29:20: error: Python.h: No such file or directory ...

  3. make: *** /lib/modules/3.10.0-327.el7.x86_64/build: 没有那个文件或目录。 停止。

    1.问题: [root@localhost]# make make -C /lib/modules/-.el7.x86_64/build M=/home/csri/poc/adore modules ...

  4. Linux命令(20)linux服务器之间复制文件和目录

    linux的scp命令: scp就是secure copy的简写,用于在linux下进行远程拷贝文件的命令,和它类似的命令有cp,不过cp只是在本机进行拷贝不能跨服务器. 有时我们需要获得远程服务器上 ...

  5. (转自http://www.blogjava.net/moxie/archive/2006/10/20/76375.html)WebWork深入浅出

    (转自http://www.blogjava.net/moxie/archive/2006/10/20/76375.html) WebWork深入浅出 本文发表于<开源大本营> 作者:钱安 ...

  6. 背水一战 Windows 10 (20) - 绑定: DataContextChanged, UpdateSourceTrigger, 对绑定的数据做自定义转换

    [源码下载] 背水一战 Windows 10 (20) - 绑定: DataContextChanged, UpdateSourceTrigger, 对绑定的数据做自定义转换 作者:webabcd 介 ...

  7. Scrum会议10.20

    Scrum会议   组名称:好好学习 项目名称:记账本 参会成员:林莉(Master)胡丽娜 汪东涵 宫丽君 时间:2016.10.20 已完成内容: 1.理解项目和代码. 2.讨论新功能. 计划完成 ...

  8. 查询数据库:models.Books.objects.all()[10: 20]与models.Books.objects.filter(id__gt=10, id__lt=20).values() 的区别

    1. models.Books.objects.all()[10: 20] (10:20  之间是冒号,不是逗号.)查出的是 QuerySet对象,如需进行操作,得进一步进行剥皮. 查询代码: 查询结 ...

  9. OSC Source Code Innovation Salon(2018.10.20)

    时间:2018.10.20地点:北京 朝阳 浦项中心B座2层

随机推荐

  1. NetBios 的结构体详解

    [NetBios 的结构体详解] NetBIOS是早期的局域网传输协议. 1.结构体. 2.命令 NetBIOS命令的使用方式有两种,即等待和非等待(或称为同步与异步)方式. 如果命令码的高阶位是0时 ...

  2. C语言乱谈(一) 20行代码生成BMP

    在学习图形图像的过程中,最简单和常见的格式是BMP和PPM.下面将给出生成BMP的极度精简代码,然后讲解BMP格式. #include <stdio.h> #include <std ...

  3. CentOS下的Memcache安装步骤(Linux+Nginx+PHP+Memcached)

    一.源码包准备 服务器端主要是安装memcache服务器端下载:http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz另外,Memca ...

  4. HR开发 获取信息类型数据

    1.PNP逻辑数据库. LOOP获取信息类型数据. TABLES: PERNR . , . START-OF-SELECTION. GET PERNR . LOOP AT P0000 WHERE .. ...

  5. Android Studio线下版和线上版都使用正式签名脚本(保证keysore签名文件和项目在同级目录),不用再因为繁琐的发正式版而烦恼

    场景:调用微信等第三方应用时如果生成的版本不是正式签名的可能会调用失败,使用如下脚本不用再为繁琐的发正式签名版而烦恼 app项目中的build.gradle追加如下代码: //使用正式签名脚本(保证k ...

  6. [技巧.Dotnet]轻松实现“强制.net程序以管理员身份运行”。

    使用场景: 程序中不少操作都需要特殊权限,有时为了方便,直接让程序以管理员方式运行. (在商业软件中,其实应该尽量避免以管理员身份运行.在安装或配置时,提前授予将相应权限.) 做法: 以C#项目为例: ...

  7. [问题记录.dotnet]取网卡信息报错"找不到"-WMI - Not found

    异常: System.Management.ManagementException: 找不到     在 System.Management.ManagementException.ThrowWith ...

  8. MVC5+EF6 Code First 从零开始——第一章

    一直在用Database First 突然感觉关系复杂的时候,生成json经常出现死循环,不够灵活. 今天正好是周五,不太忙就想试试code first吧,试了2次,终于有结果. ok废话不多说,先撸 ...

  9. liunx打开指定端口

    1.切换为root用户 2.切换路径至:/etc/sysconfig 3.vi编辑添加一行: -A INPUT -m state --state NEW -m tcp -p tcp --dport 3 ...

  10. varnish

    html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,bi ...