PIP安装失败

时间:2012-12-22 18:52:48

标签: python django firebird pip

我正在学习Python,我所遵循的文档建议安装Firebird。我跑了sudo pip install fdb

我看到一个构建目录,我理解它只包含源代码而不是二进制文件,所以我删除了它。当我pip freeze | grep fdb时,我找不到Firebird。

我尝试再次运行sudo pip install fdb并且我现在收到此错误(并且构建目录正在返回):

Downloading/unpacking fdb
  Downloading fdb-0.9.9.tar.gz (481Kb): 481Kb downloaded
  Running setup.py egg_info for package fdb
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/Users/nayef/Documents/Django/build/fdb/setup.py", line 7, in <module>
        from fdb import __version__
      File "fdb/__init__.py", line 23, in <module>
        from fdb.fbcore import *
      File "fdb/fbcore.py", line 26, in <module>
        from . import ibase
      File "fdb/ibase.py", line 1164, in <module>
        isc_attach_database = fb_library.isc_attach_database
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 366, in __getattr__
        func = self.__getitem__(name)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 371, in __getitem__
        func = self._FuncPtr((name_or_ordinal, self))
    AttributeError: dlsym(RTLD_DEFAULT, isc_attach_database): symbol not found
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/Users/nayef/Documents/Django/build/fdb/setup.py", line 7, in <module>

    from fdb import __version__

  File "fdb/__init__.py", line 23, in <module>

    from fdb.fbcore import *

  File "fdb/fbcore.py", line 26, in <module>

    from . import ibase

  File "fdb/ibase.py", line 1164, in <module>

    isc_attach_database = fb_library.isc_attach_database

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 366, in __getattr__

    func = self.__getitem__(name)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 371, in __getitem__

    func = self._FuncPtr((name_or_ordinal, self))

AttributeError: dlsym(RTLD_DEFAULT, isc_attach_database): symbol not found

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /Users/nayef/Documents/Django/build/fdb
Storing complete log in /Users/nayef/Library/Logs/pip.log

我在这里做错了什么?我不确定pip有什么问题。我从来没有遇到任何问题。

1 个答案:

答案 0 :(得分:5)

这不是 pip 失败,这是 fdb 包安装失败。

似乎你缺少一些驱动程序,特别是firebird头文件。

你有firebird installed吗?确保在安装驱动程序后才安装Python绑定。