编程语言
首页 > 编程语言> > python – PIP安装失败

python – PIP安装失败

作者:互联网

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

我看到一个构建目录,据我所知只包含源代码而不是二进制文件所以我删除了它.当我做pip冻结| 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有什么问题.我从来没有遇到任何问题.

解决方法:

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

看起来你有一些驱动程序缺失,特别是firebird头文件.

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

标签:python,django,pip,firebird
来源: https://codeday.me/bug/20190901/1783156.html