我正在尝试安装一个名为"dbt“的软件包,我收到了一条非常长的错误消息。
我在googled上搜索了导致我找到一个thread的问题。在这里,我试着过滤出那些与我相关的答案,我在Windows上。我更新了最新版本的pip in。我试着安装“python tools”,但没有帮助。我觉得有点卡住了。有什么建议吗?我添加下面的错误信息以供参考。
提前谢谢你!
错误信息:
错误:退出状态1错误的命令:命令:'c:\users\46700\appdata\local\programs\python\python38-32\python.exe‘-c的导入系统、setuptools、tokenize;sys.argv = '"'"'C:\Users\46700\AppData\Local\Temp\pip-install-4tzr2bw2\psycopg2\setup.py'"'"';file='"'"'C:\Users\46700\AppData\Local\Temp\pip-install-4tzr2bw2\psycopg2\setup.py'"'"';open)(file);code=f.read().replace('"'"'\r\n'"'"',‘open)(file);code=f.read().replace(’“‘”’\r\n‘“’”‘,’);f.close();编译(代码,文件,‘(’)‘“写C:\Users\46700\AppData\Local\Temp\pip-install-4tzr2bw2\psycopg2\pip-egg-info\psycopg2.egg-info\PKG-INFO写dependency_links到C:\Users\46700\AppData\Local\Temp\pip-install-4tzr2bw2\psycopg2\pip-egg-info\psycopg2.egg-info\dependency_links.txt写顶级名称到C:\Users\46700\AppData\Local\Temp\pip-install-4tzr2bw2\psycopg2\pip-egg-info\psycopg2.egg-info\top_level.txt写入清单文件'C:\Users\46700\AppData\Local\Temp\pip-install-4tzr2bw2\psycopg2\pip-egg-info\psycopg2.egg-info\SOURCES.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>).
----------------------------------------
错误:退出状态1错误的命令: python setup.py egg_info检查日志以获得完整的命令输出。
发布于 2020-06-25 05:06:33
要解决这个问题,我建议使用pip安装pyscopg2。然后再次运行DBT安装。
pip install psycopg2-binary
pip install dbt
https://docs.getdbt.com/docs/running-a-dbt-project/using-the-command-line-interface/windows/
https://stackoverflow.com/questions/58560097
复制相似问题