ubuntu 安装psycopg2包
psycopg2 库是 python 用来操作 postgreSQL 数据库的第三方库。
执行:pip3 install psycopg2==2.8.4
有可能会报错:
Collecting psycopg2==2.8.4
Downloading https://files.pythonhosted.org/packages/84/d7/6a93c99b5ba4d4d22daa3928b983cec66df4536ca50b22ce5dcac65e4e71/psycopg2-2.8.4.tar.gz (377kB)
100% |████████████████████████████████| 378kB 1.1MB/s
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
/usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
/usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
warning: manifest_maker: standard file '-c' not found 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>). ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-txs3m3mb/psycopg2/
解决方法
sudo apt-get install postgresql
sudo apt-get install python-psycopg2
sudo apt-get install libpq-dev
pip3 install psycopg2==2.8.4
ubuntu 安装psycopg2包的更多相关文章
- linux下查看某软件是否已安装, ubuntu安装deb包
1.rpm包安装的,可以用rpm -qa看到,如果要查找某软件包是否安装,用 rpm -qa | grep “软件或者包的名字”. [root@hexuweb102 ~] rpm -qa | grep ...
- Ubuntu --- 安装deb包
在Ubuntu下安装deb包需要使用dpkg命令.Dpkg 的普通用法: 1.sudo dpkg -i <package.deb> 安装一个 Debian 软件包,如你手动下载的文件. 2 ...
- ubuntu安装deb包(dpkg)
安装 sudo dpkg -i DEB_PACKAGE 卸载 sudo dpkg -r PACKAGE_NAME 重新配置已安装的包 Reconfigure an existing package 例 ...
- ubuntu安装rpm包
ubuntu下的rpm包的安装方法 一般是不能够直接安装的,我们需要一个工具叫alien,先install它吧.然后按照下面择所需. 1.直接安装: alien -i -c filename.rpm ...
- ubuntu安装rpm包,deb包等各种包
ubuntu下的各种包的安装方法 Ubuntu麒麟自带的包管理工具有apt-get,但是里面的软件包一般年代比较久远,源更新很慢,支持也很少.如果想安装一些比较新的包,可以尝试到PPA上去找找看,找到 ...
- ubuntu 安装Elasticsearch5.0(Debian包)
通过Debian包安装Elasticsearch Elasticsearch的Debian包可以从downloaded from our website或APT repository 它可以用于在任何 ...
- Ubuntu下deb包的安装方法 (zz)
Ubuntu下deb包的安装方法 分类: Ubuntu10使用技巧 2010-10-11 23:49 42969人阅读 评论(3) 收藏 举报 ubuntudebdebianlinux deb是deb ...
- ubuntu下deb包的安装方法
ubuntu下deb包的安装方法 简介 deb是debian linus的安装格式,跟red hat的rpm非常相似,最基本的安装命令是:dpkg -i file.deb dpkg 是Debian P ...
- 【转】Ubuntu下deb包的安装方法
[转]Ubuntu下deb包的安装方法 deb是debian linus的安装格式,跟red hat的rpm非常相似,最基本的安装命令是:dpkg -i file.deb dpkg 是Debian P ...
- ubuntu安装greenplum依赖包
ubuntu安装greenplum的过程中有两个比较难找的包,特地写出来给大家分享一下: 错误提示1:configure: error: header file <ldap.h> is r ...
随机推荐
- Linux 内核:I2C子系统分析(1)基于子系统的驱动分析与实现
Linux 内核:I2C子系统分析(1)基于子系统的驱动分析与实现 背景 在学习高通平台的有关知识,看到一篇博客中介绍了GPIO模拟I2C设备,觉得挺有意思的. 看了看有关的实现,发现自己之前学习从L ...
- 基于OMAPL138+FPGA核心板——MCSDK开发入门(下)
本文测试板卡为创龙科技 SOM-TL138F 是一款基于 TI OMAP-L138(定点/浮点 DSP C674x + ARM9)+ 紫光同创 Logos/Xilinx Spartan-6 低功耗 F ...
- vulnhub - hackme2
vulnhub - hackme2 信息收集 还是跟1一样,目录扫描之类的没啥利用点,sql注入先打一遍 SQL注入 sqlmap -u 'http://192.168.157.163/welcome ...
- GitHub 创始人资助的开源浏览器「GitHub 热点速览」
你是否注意到,现在主流的浏览器如 Chrome.Edge.Brave 和 Opera 都采用了谷歌的 Chromium 引擎?同时,谷歌每年不惜花费数十亿美元,确保其搜索引擎在 Safari 中的默认 ...
- vue项目的简单创建与插件下载
准备工作 安装node.js 安装node.js过程全部采用默认配置,一步一步next即可 检验node.js是否安装成功:在cmd命令行中输入node -v以及npm -v 通过cmd创建 安装vu ...
- 微软账号密码修改后提示密码错误的解决方法(远程桌面&smb共享访问等)
众所周知,自从微软将Microsoft账户与Windows账号强制绑定后,使用起来便一直有诸多困难,在Microsoft Support和搜索引擎长期搜索解决方案未果,今天偶然在一个佬的博客翻到了这个 ...
- 解码 xsync 的 map 实现
解码 xsync 的 map 实现 最近在寻找 Go 的并发 map 库的时候,翻到一个 github 宝藏库,xsync (https://github.com/puzpuzpuz/xsync) . ...
- 基于Java+SpringBoot+vue+element助农平台设计和实现
\n文末获取源码联系 感兴趣的可以先收藏起来,大家在毕设选题,项目以及论文编写等相关问题都可以给我加好友咨询 系统介绍: 随着互联网大趋势的到来,社会的方方面面,各行各业都在考虑利用互联网作为媒介将自 ...
- 利用FastAPI和OpenAI-Whisper打造高效的语音转录服务
最近好久没有写博客了,浅浅记录下如何将OpenAI-Whisper做成Web服务吧 介绍 在这篇指导性博客中,我们将探讨如何在Python中结合使用FastAPI和OpenAI-Whisper.Ope ...
- 【漏洞分析】Li.Fi攻击事件分析:缺乏关键参数检查的钻石协议
背景信息 2024 年 7 月 16日,Li.Fi 协议遭受黑客攻击,漏洞成因是钻石协议中 diamond 合约新添加的 facet 合约没有对参数进行检查,导致 call 函数任意执行.且 diam ...