1.现象:

python3.7安装psycopg2==2.8.5报错,Error: pg_config executable not found

python3.7安装psycopg2,报错Error: pg_config executable not found

2.解决方法

查找pg_config,# which pg_config

python3.7安装psycopg2,报错Error: pg_config executable not found

添加查找到的路径到环境变量,执行:# export PATH=/usr/pgsql-9.6/bin/:$PATH

在/etc/profile路径下,查到说明添加成功

python3.7安装psycopg2,报错Error: pg_config executable not found

执行:# source /etc/profile,使修改生效。

3.结果

重新执行pip安装命令,安装成功。

python3.7安装psycopg2,报错Error: pg_config executable not found

 

相关文章:

  • 2022-02-22
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2021-05-25
猜你喜欢
  • 2021-11-01
  • 2021-09-20
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案