gpt4 book ai didi

python - psycopg2 的 pip 安装说没有部分错误 'build_ext'

转载 作者:行者123 更新时间:2023-11-28 20:49:33 25 4
gpt4 key购买 nike

我正在尝试在 Ubuntu 12.04 机器上的 virtualenv 中安装 psycopg2。所有相关的软件包都已安装(python-dev、libpq-dev 等...)

当我在激活 virtualenv 的情况下运行 pip install psycopg2 时,我得到以下输出。这似乎是一个路径遍历问题。 setup.cfg 显然在最顶部有一个 [build_ext] 部分,所以我认为 setup.py 没有找到正确的文件。有帮助吗?

Downloading/unpacking psycopg2
Running setup.py egg_info for package psycopg2
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/vagrant/outland_env/build/psycopg2/setup.py", line 459, in <module>
use_pydatetime = int(parser.get('build_ext', 'use_pydatetime'))
File "/home/vagrant/outland_env/local/lib/python2.7/site-packages/configparser.py", line 798, in get
d = self._unify_values(section, vars)
File "/home/vagrant/outland_env/local/lib/python2.7/site-packages/configparser.py", line 1154, in _unify_values
raise NoSectionError(section)
configparser.NoSectionError: No section: 'build_ext'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

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

File "/home/vagrant/outland_env/build/psycopg2/setup.py", line 459, in <module>

use_pydatetime = int(parser.get('build_ext', 'use_pydatetime'))

File "/home/vagrant/outland_env/local/lib/python2.7/site-packages/configparser.py", line 798, in get

d = self._unify_values(section, vars)

File "/home/vagrant/outland_env/local/lib/python2.7/site-packages/configparser.py", line 1154, in _unify_values

raise NoSectionError(section)

configparser.NoSectionError: No section: 'build_ext'

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/vagrant/outland_env/build/psycopg2
Storing complete log in /tmp/tmpoeLbaP

最佳答案

不确定这是否有帮助,但我只需要 cd 进入 setup.py 所在的下载安装目录。

关于python - psycopg2 的 pip 安装说没有部分错误 'build_ext',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14238831/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com