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 ...
随机推荐
- vim 中代码的折叠和打开
# vim 中代码的折叠和打开 reference: vim中代码的折叠和打开(有删改) https://www.cnblogs.com/xuxm2007/archive/2011/11/10/224 ...
- Ubuntu 22.04单机部署K3s
安装docker 从docker官网获取最新的一键安装脚本,安装docker运行环境 curl -fsSL https://get.docker.com -o get-docker.sh sudo s ...
- Springboot整合Apollo
一.Apollo作用 随着程序功能的日益复杂,程序的配置日益增多:各种功能的开关.参数的配置.服务器的地址-- 对程序配置的期望值也越来越高:配置修改后实时生效,灰度发布,分环境.分集群管理配置,完善 ...
- VS License Header Manager 插件
/************************************************************************************* * * 文 件 名: %F ...
- springboot 访问url 报404
使用Springboot 写了一个后端服务,通过 postman 测试接口时,发现一直 404 (message: No message available) 把springboot 从启动 到 da ...
- java 高效递归查询树 find_in_set 处理递归树
建表语句 DROP TABLE IF EXISTS `sys_dept`; CREATE TABLE `sys_dept` ( `id` bigint(20) NOT NULL AUTO_INCREM ...
- 学习Java的第一周总结
经历了一周关于Java的学习后,我想已经初步了解了Java.在这一周中我跟随黑马程序员的脚步初步学习,现在已经安装了jdk环境(当然它不只是一个运行环境,还附带了许多开发工具)并能够用它输出" ...
- Pandas库学习笔记(4)---Pandas DataFrame
Pandas DataFrame Pandas DataFrame基本操作 DataFrame是二维数据结构,即,数据以表格形式在行和列中对齐. DataFrame的功能 潜在的列是不同类型的 大小可 ...
- CF1988C Increasing Sequence with Fixed OR Solution
题意简述如下: 给定一个正整数 \(n\),请构造一个正整数序列使其满足以下条件并尽可能长:这个序列中每个数都大于等于 \(1\) 且小于等于\(n\):这个序列是单调递增的:这个序列中任意两个相邻的 ...
- Git的存储原理
目录 Git 设计原理 Git vs SVN Git 存储模型 .git 目录结构 Git 基本数据对象 Git 包文件 Git 引用 Git 设计原理 概括的讲,Git 就是一个基于快照的内容寻址文 ...