我有一个干净的虚拟环境,我用pipenv设置。我需要安装一个名为wrds的包,它似乎有psycopg2
作为依赖项。我在运行pipenv install wrds
后出现此错误
完整的错误显示:
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.
所以我运行了pipenv install psycopg2-binary
,得到了相同的错误。我真的不明白这里发生了什么。我不想从源代码构建psycopg2,因为我需要我的其他团队成员能够运行pipenv install
编辑:刚刚找到这个,它提供了一些有用的信息https://github.com/pypa/pipenv/issues/3991
我也有同样的问题,在Mac OS上,我用自制软件包管理器解决了这个问题
安装postgresql pipenv后,成功锁定环境
相关问题 更多 >
编程相关推荐