【发布时间】:2015-07-20 19:18:06
【问题描述】:
操作系统:Mac 10.9 Python 版本:2.7.9 数据库:postgresql 9.3
我正在输入以下命令在我的 virtualenv 中安装 psycopg2: ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install psycopg2
我收到以下错误: 回溯(最近一次通话最后): 文件“/Users/dialynsoto/python_ex/crmeasy/venv/bin/pip”,第 7 行,在 从点进口主要 文件“/Users/dialynsoto/python_ex/crmeasy/venv/lib/python2.7/site-packages/pip/init.py”,第 13 行,在 从 pip.utils 导入 get_installed_distributions,get_prog 文件“/Users/dialynsoto/python_ex/crmeasy/venv/lib/python2.7/site-packages/pip/utils/init.py”,第 18 行,在 从 pip.locations 导入( 文件“/Users/dialynsoto/python_ex/crmeasy/venv/lib/python2.7/site-packages/pip/locations.py”,第 9 行,在 导入临时文件 文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py”,第 35 行,在 从随机导入随机作为_Random 文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py”,第 49 行,在 将 hashlib 导入为 _hashlib 文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第 138 行,在 _hashlib.openssl_md_meth_names) AttributeError:“模块”对象没有属性“openssl_md_meth_names”
有什么线索吗?
【问题讨论】:
-
有一个用于 postgres 访问的纯 python 模块 -- pg8000 -- 它可以完成 psycopg2 的工作,并且不需要 C 编译器。也许试试?
标签: python