python pip3 安装psycopg2报错

python pip3 安装psycopg2报错,第1张

[root@edb ~]$ pip3 install psycopg2
Defaulting to user installation because normal site-packages is not writeable
Collecting psycopg2
  Using cached psycopg2-2.9.3.tar.gz (380 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

最后倒数第二句说的是包的问题,不是pip命令的问题,说明python安装的是没问题的,解决方案:

[root@edb ~]$ pip3 install --upgrade setuptools
[root@edb ~]$ pip3 install psycopg2

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/790063.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-05
下一篇2022-05-05

发表评论

登录后才能评论

评论列表(0条)

    保存