命令"python setup.py egg_info"失败,错误代码为 1 in?



当我在Pycharm终端pip install psycopg2中运行时,它给了我这个错误Command "python setup.py egg_info" failed with error code 1 in C:Users...我尝试了很多在stackoverflow上发现的东西,但仍然不起作用。我的pip版本是19.0.3,我的python版本是3.8

在下面的日志中,它还显示Error: pg_config executable not found

当我尝试pip安装psycopg2 时的完整日志

Collecting psycopg2
Using cached https://files.pythonhosted.org/packages/84/d7/6a93c99b5ba4d4d22daa3928b983cec66df4536ca50b22ce5dcac65e4e71/psycopg2-2.8.4.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-infopsycopg2.egg-info
writing pip-egg-infopsycopg2.egg-infoPKG-INFO
writing dependency_links to pip-egg-infopsycopg2.egg-infodependency_links.txt
writing top-level names to pip-egg-infopsycopg2.egg-infotop_level.txt
writing manifest file 'pip-egg-infopsycopg2.egg-infoSOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source.  Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:UsersxxxAppDataLocalTemppip-install-ws21otxrpsycopg2

使用pip安装postgres客户端将尝试构建&从源安装,如错误消息所述,它具有额外的依赖项。

继续做吧pip安装psycopg2二进制文件你就在的路上

相关内容

最新更新