本人 ubuntu 系统

报错信息

ERROR: Command errored out with exit status 1:
......
......
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-YghUSC/psycopg2/setup.py'"'"'; __file__='"'"'
/tmp/pip-install-YghUSC/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)
(__file__);code=f.read().replace(
'"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-DBwrS9/install-record.txt
--single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/psycopg2
Check the logs for full command output.

解决:

首先看一下自己的pip 是否是最高版本,如果不是 
pip install --upgrade pip

手动安装pip:
wget https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
tar -zxvf pip-9.0.1.tar.gz
cd pip-9.0.1
python setup.py install
pip install --upgrade pip

如果是最高版本,检查是否有这个驱动libpq-dev,如果没有
sudo apt-get install libpq-dev

最终

ubuntu安装psycopg2报错 Check the logs for full command output解决

 

相关文章:

  • 2020-05-29
  • 2021-12-28
  • 2021-04-21
  • 2022-01-08
  • 2021-06-11
  • 2021-10-12
猜你喜欢
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2021-11-29
相关资源
相似解决方案