ICode9

精准搜索请尝试: 精确搜索
首页?>?bet356官网> 文章详细

Ubuntu 18.04 bet356体育下载_bet356客服邮箱_bet356官网 psycopg2 报错

2019-09-10 16:37:10??阅读:75??来源: 互联网

标签:info?18.04?psycopg2?dev?报错?libpq?pip?egg


常见问题,记录一下

pip3 install psycopg2
Collecting psycopg2==2.8.3 (from -r requirements.txt (line 8))
  Using cached https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /home/huzing2524/.virtualenvs/circuit_board/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ufsmqwic/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ufsmqwic/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-install-ufsmqwic/psycopg2/
    Complete output (7 lines):
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    Error: b'You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.\n'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  • 解决办法:在全局bet356体育下载_bet356客服邮箱_bet356官网依赖
  • 解释:The libpq-dev library is built following Debian's libpq-dev package_
    idea: it contains a minimal set of PostgreSQL_ binaries and headers requried
    for building 3rd-party applications for PostgreSQL_.
    sudo apt install libpq-dev
    
    正在读取软件包列表... 完成
    正在分析软件包的依赖关系树       
    正在读取状态信息... 完成       
    下列软件包是自动bet356体育下载_bet356客服邮箱_bet356官网的并且现在不需要了:
      linux-headers-5.0.0-23 linux-headers-5.0.0-23-generic linux-image-5.0.0-23-generic linux-modules-5.0.0-23-generic linux-modules-extra-5.0.0-23-generic
    使用'sudo apt autoremove'来卸载它(它们)。
    建议bet356体育下载_bet356客服邮箱_bet356官网:
      postgresql-doc-10
    下列【新】软件包将被bet356体育下载_bet356客服邮箱_bet356官网:
      libpq-dev
    升级了 0 个软件包,新bet356体育下载_bet356客服邮箱_bet356官网了 1 个软件包,要卸载 0 个软件包,有 39 个软件包未被升级。
    需要下载 218 kB 的归档。
    解压缩后会消耗 1,092 kB 的额外空间。
    获取:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpq-dev amd64 10.10-0ubuntu0.18.04.1 [218 kB]
    已下载 218 kB,耗时 2秒 (95.0 kB/s)                   
    正在选中未选择的软件包 libpq-dev。
    (正在读取数据库 ... 系统当前共bet356体育下载_bet356客服邮箱_bet356官网有 207162 个文件和目录。)
    正准备解包 .../libpq-dev_10.10-0ubuntu0.18.04.1_amd64.deb  ...
    正在解包 libpq-dev (10.10-0ubuntu0.18.04.1) ...
    正在设置 libpq-dev (10.10-0ubuntu0.18.04.1) ...
    正在处理用于 man-db (2.8.3-2ubuntu0.1) 的触发器 ...
    
    Collecting psycopg2==2.8.3 (from -r requirements.txt (line 8))
      Using cached https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz
    Building wheels for collected packages: psycopg2
      Building wheel for psycopg2 (setup.py) ... done
      Created wheel for psycopg2: filename=psycopg2-2.8.3-cp36-cp36m-linux_x86_64.whl size=418320 sha256=4b87f24e17156d65c4276f02a01506c3301b7832b28094367c5e85baddf08c2d
      Stored in directory: /home/huzing2524/.cache/pip/wheels/48/06/67/475967017d99b988421b87bf7ee5fad0dad789dc349561786b
    Successfully built psycopg2
    Installing collected packages: psycopg2
    Successfully installed psycopg2-2.8.3
    





标签:info,18.04,psycopg2,dev,报错,libpq,pip,egg

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有