最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

解決pip install psycopg2出錯問題

 更新時間:2020年07月09日 10:17:24   作者:喝粥也會胖的唐僧  
這篇文章主要介紹了解決pip install psycopg2出錯問題。具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧

pip install psycopg2出現(xiàn)錯誤:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting psycopg2
 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/84/d7/6a93c99b5ba4d4d22daa3928b983cec66df4536ca50b22ce5dcac65e4e71/psycopg2-2.8.4.tar.gz (377 kB)
 ERROR: Command errored out with exit status 1:
  command: /opt/AN/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lkf6b0y5/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lkf6b0y5/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 /tmp/pip-install-lkf6b0y5/psycopg2/pip-egg-info
   cwd: /tmp/pip-install-lkf6b0y5/psycopg2/
 Complete output (23 lines):
 running egg_info
 creating /tmp/pip-install-lkf6b0y5/psycopg2/pip-egg-info/psycopg2.egg-info
 writing /tmp/pip-install-lkf6b0y5/psycopg2/pip-egg-info/psycopg2.egg-info/PKG-INFO
 writing dependency_links to /tmp/pip-install-lkf6b0y5/psycopg2/pip-egg-info/psycopg2.egg-info/dependency_links.txt
 writing top-level names to /tmp/pip-install-lkf6b0y5/psycopg2/pip-egg-info/psycopg2.egg-info/top_level.txt
 writing manifest file '/tmp/pip-install-lkf6b0y5/psycopg2/pip-egg-info/psycopg2.egg-info/SOURCES.txt'
 
 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>).
 
 ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

解決方法:

yum install postgresql postgresql-devel python-devel python3-devel

補充知識:anaconda 通過pip 安裝python psycopg2

1. 【不能在cmd里install】之前一直在 cmd 里conda install psycopg2 ,pip install psycopg2,雖然提示安裝成功,但是import時還是會報錯提示包不存在。

2. 【在prompt里pip】正確的安裝方法是,安裝完成 anaconda,進入anaconda prompt,輸入命令即可

pip install psycopg2

3. import psycopg2 未報錯,安裝成功。

以上這篇解決pip install psycopg2出錯問題就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • 解決redis與Python交互取出來的是bytes類型的問題

    解決redis與Python交互取出來的是bytes類型的問題

    這篇文章主要介紹了解決redis與Python交互取出來的是bytes類型的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2020-07-07
  • 如何在Python里使用ChatGPT及ChatGPT簡介

    如何在Python里使用ChatGPT及ChatGPT簡介

    今年最火的應(yīng)該就是ChatGPT了,現(xiàn)在短短2個月已經(jīng)突破了1億注冊用戶,馬斯克可高興壞了,這篇文章主要介紹了如何在Python里使用ChatGPT及ChatGPT是什么?注冊方式?需要的朋友可以參考下
    2023-02-02
  • Python實現(xiàn)簡單的HttpServer服務(wù)器示例

    Python實現(xiàn)簡單的HttpServer服務(wù)器示例

    本篇文章主要介紹了Python實現(xiàn)簡單的HttpServer服務(wù)器示例,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-09-09
  • python計算兩個地址之間的距離方法

    python計算兩個地址之間的距離方法

    今天小編就為大家分享一篇python計算兩個地址之間的距離方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2018-06-06
  • Python中按指定數(shù)量分割列表字符串的兩種方法

    Python中按指定數(shù)量分割列表字符串的兩種方法

    處理列表數(shù)據(jù)時,有時我們需要將一個包含長字符串的列表分割成按照特定長度的小字符串的多個列表,本文主要介紹了Python中按指定數(shù)量分割列表字符串,具有一定的參考價值,感興趣的可以了解一下
    2024-03-03
  • python從入門到實踐之字典

    python從入門到實踐之字典

    這篇文章主要為大家介紹了python字典,具有一定的參考價值,感興趣的小伙伴們可以參考一下,希望能夠給你帶來幫助
    2022-01-01
  • python 3.8.3 安裝配置圖文教程

    python 3.8.3 安裝配置圖文教程

    這篇文章主要為大家詳細介紹了python 3.8.3 安裝配置圖文教程,文中安裝步驟介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2020-05-05
  • 利用Python批量生成任意尺寸的圖片

    利用Python批量生成任意尺寸的圖片

    不知道大家有沒有遇到過,因檢驗需要1000張,分別從1*1到1000*1000像素的圖片。搜索一番過后發(fā)現(xiàn)還是Python實現(xiàn)比較方便,遂決定用Python實現(xiàn)這一功能,下面分享給大家,有需要的可以參考。
    2016-08-08
  • Pytorch?nn.Unfold()?與?nn.Fold()圖碼詳解(最新推薦)

    Pytorch?nn.Unfold()?與?nn.Fold()圖碼詳解(最新推薦)

    這篇文章主要介紹了Pytorch?nn.Unfold()?與?nn.Fold()圖碼詳解,本文給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2023-05-05
  • python?自定義包的實現(xiàn)示例

    python?自定義包的實現(xiàn)示例

    如果Python的模塊過多,可能造成一定的混亂,這時可以通過Python包來管理模塊,本文主要介紹了python?自定義包的實現(xiàn)示例,感興趣的可以了解一下
    2024-05-05

最新評論

无锡市| 仙桃市| 迁西县| 颍上县| 牡丹江市| 颍上县| 吐鲁番市| 扎兰屯市| 龙山县| 洪泽县| 达州市| 通州市| 内黄县| 辽源市| 涿州市| 福泉市| 师宗县| 镇安县| 黑山县| 石柱| 循化| 寿光市| 义马市| 怀仁县| 双鸭山市| 泰来县| 宝鸡市| 聂荣县| 四子王旗| 米林县| 百色市| 迭部县| 云南省| 上饶县| 武威市| 麻江县| 霍邱县| 杭锦旗| 普定县| 中宁县| 新巴尔虎右旗|