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 ...
随机推荐
- 一款开源、免费、现代化风格的WPF UI控件库 - ModernWpf
前言 今天大姚给大家分享一款开源(MIT License).免费.现代化风格的WPF UI控件库:ModernWpf. 项目介绍 ModernWpf是一个开源项目,它为 WPF 提供了一组现代化的控件 ...
- PAT-甲级-1007
一.看题,https://www.patest.cn/contests/pat-a-practise/1007 其实,也是一顿暴力,但是最后一个测试点会运行超时,最开始,计算一段区间的值的总和的时候, ...
- C# pythonnet(3)_Butter-worth低通滤波
Python代码如下 import pandas as pd import numpy as np import matplotlib.pyplot as plt from scipy import ...
- 金蝶云·苍穹追光者开发大赛,点燃高校AI应用创新之火
在 2024 年的政府工作报告中,"人工智能 +" 行动被提出,标志着人工智能成为推动我国新质生产力发展的关键力量.与此同时,今年的高考作文有一道题目也聚焦于人工智能,再次凸显了这 ...
- JavaSe 统计字符串中字符出现的次数
public static void main(String[] args) { // 1.字符串 String str = "*Constructs a new <tt>Has ...
- yb课堂 开发前端项目路由 《三十五》
Vue-Router开发前端项目路由 vue-router 是Vue.js官方的路由管理器,它和Vue.js的核心深度集成,让构建单页面应用变得易如反掌 官方文档:https://router.vue ...
- 转载 | win11右键菜单改为win10的bat命令(以及恢复方法bat)
原文来自这里:https://blog.51cto.com/knifeedge/5340751 版权归:IT利刃出鞘 本质上就是写入注册表. 一.右键菜单改回Win10(展开) 1. 新建文件:win ...
- PHP7新特性之类型声明
今天我在这里总结下PHP7主要的新特性. 1.类型声明 做过php开发的小伙伴们都知道,php7以前的版本变量是不需要声明类型的,函数返回值也是不需要声明类型的,总之,在我们的脑海中就没有这么回事.可 ...
- 在缩小浏览器宽度的时候,图片会超出li的宽度
要确保在缩小浏览器宽度时,图片不会超出 <li> 元素的宽度,您可以为描述文本添加一些样式,以便让图片适应于 <li> 元素.一种常见的方法是使用 CSS 中的 max-wid ...
- SUM-ACM,3月24-3-31周报
两场天梯赛和一场atcoder. 主要错误知识点在于字符串的处理和并查集的掌握不够,不懂灵活运用. 第一场pta天梯赛 7-5 6翻了 一道字符串的题,我只拿了14分.我不熟悉一个点,f(i,0,s. ...