gpt4 book ai didi

python - psycopg2 的构建轮失败

转载 作者:行者123 更新时间:2023-12-04 04:15:04 25 4
gpt4 key购买 nike

<分区>

我需要下载 psycopg2 包才能使用正在使用的 postgresql 数据库。不幸的是,当我尝试 pip install psycopg2 时,弹出以下错误:

failed building wheel for psycopg2

我的操作系统:windows


日志

Building wheel for psycopg2-binary (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Windows 10\.virtualenvs\project-e1HiiE3H\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Windows 10\\AppData\\Local\\Temp\\pip-install-u7m2a_o9\\psycopg2-binary\\setup.py'"'"'; __file__='"'"'C:\\Users\\Windows 10\\AppData\\Local\\Temp\\pip-install-u7m2a_o9\\psycopg2-binary\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Windows 10\AppData\Local\Temp\pip-wheel-bv5plcfw'
cwd: C:\Users\Windows 10\AppData\Local\Temp\pip-install-u7m2a_o9\psycopg2-binary\
Complete output (24 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\psycopg2
copying lib\compat.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\errorcodes.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\errors.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\extensions.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\extras.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\pool.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\sql.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\tz.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\_ipaddress.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\_json.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\_lru_cache.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\_range.py -> build\lib.win-amd64-3.9\psycopg2
copying lib\__init__.py -> build\lib.win-amd64-3.9\psycopg2
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
building 'psycopg2._psycopg' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

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