{"id":8284,"date":"2022-05-30T14:45:05","date_gmt":"2022-05-30T06:45:05","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=8284"},"modified":"2022-11-14T15:21:48","modified_gmt":"2022-11-14T07:21:48","slug":"notebook%e5%ae%89%e8%a3%85psycopg2%e7%9a%84%e6%ad%a5%e9%aa%a4","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=8284","title":{"rendered":"notebook\u5b89\u88c5psycopg2\u7684\u6b65\u9aa4"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<p>\u672c\u6587\u63cf\u8ff0notebook\u91cc\u9700\u8981\u5b89\u88c5psycopg2 \u7684\u64cd\u4f5c\u6b65\u9aa4<\/p>\n<h3>\u89e3\u51b3\u65b9\u6848<\/h3>\n<h4>1 \u8fdb\u5165\u5bf9\u5e94\u7684notebook<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2022\/05\/image-1653890074938.png\" alt=\"file\" \/><\/p>\n<h4>2 \u7f16\u8f91\u8fd9\u4e2apod\u91cc\u7684apt-get\u7684\u6e90\uff0c\u5b89\u88c5\u76f8\u5173\u5305<\/h4>\n<p>\u7531\u4e8enotebook\u7684\u955c\u50cf\u662fUbuntu\u7cfb\u7edf\uff0c\u6240\u4ee5\u5b89\u88c5\u9700\u8981\u7528apt-get\u505a\u5b89\u88c5\u3002  <\/p>\n<pre><code class=\"language-shell\">mv \/etc\/apt\/sources.list \/etc\/apt\/sources.list.init<\/code><\/pre>\n<p>\u65b0\u5efa\u4e00\u4e2a\u6e90<\/p>\n<pre><code class=\"language-shell\">vi \/etc\/apt\/sources.list<\/code><\/pre>\n<p>\u8f93\u5165\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-shell\">#\u8bbe\u7f6e\u56fd\u5185\u6e90\ndeb https:\/\/mirrors.ustc.edu.cn\/ubuntu\/ bionic main restricted universe multiverse\ndeb-src https:\/\/mirrors.ustc.edu.cn\/ubuntu\/ bionic main restricted universe multiverse\ndeb https:\/\/mirrors.ustc.edu.cn\/ubuntu\/ bionic-updates main restricted universe multiverse\ndeb-src https:\/\/mirrors.ustc.edu.cn\/ubuntu\/ bionic-updates main restricted universe multiverse\ndeb https:\/\/mirrors.ustc.edu.cn\/ubuntu\/ bionic-backports main restricted universe multiverse\ndeb-src https:\/\/mirrors.ustc.edu.cn\/ubuntu\/ bionic-backports main restricted universe multiverse\ndeb https:\/\/mirrors.ustc.edu.cn\/ubuntu\/ bionic-security main restricted universe multiverse\ndeb-src https:\/\/mirrors.ustc.edu.cn\/ubuntu\/ bionic-security main restricted universe multiverse\ndeb https:\/\/mirrors.ustc.edu.cn\/ubuntu\/ bionic-proposed main restricted universe multiverse\ndeb-src https:\/\/mirrors.ustc.edu.cn\/ubuntu\/ bionic-proposed main restricted universe multiverse\n\ndeb https:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu\/ xenial main restricted universe multiverse\n# deb-src https:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu\/ xenial main restricted universe multiverse\ndeb https:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu\/ xenial-updates main restricted universe multiverse\n# deb-src https:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu\/ xenial-updates main restricted universe multiverse\ndeb https:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu\/ xenial-backports main restricted universe multiverse\n# deb-src https:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu\/ xenial-backports main restricted universe multiverse\ndeb https:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu\/ xenial-security main restricted universe multiverse\n# deb-src https:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu\/ xenial-security main restricted universe multiverse\n\ndeb http:\/\/mirrors.aliyun.com\/ubuntu\/ trusty main multiverse restricted universe\ndeb http:\/\/mirrors.aliyun.com\/ubuntu\/ trusty-backports main multiverse restricted universe\ndeb http:\/\/mirrors.aliyun.com\/ubuntu\/ trusty-proposed main multiverse restricted universe\ndeb http:\/\/mirrors.aliyun.com\/ubuntu\/ trusty-security main multiverse restricted universe\ndeb http:\/\/mirrors.aliyun.com\/ubuntu\/ trusty-updates main multiverse restricted universe\ndeb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ trusty main multiverse restricted universe\ndeb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ trusty-backports main multiverse restricted universe\ndeb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ trusty-proposed main multiverse restricted universe\ndeb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ trusty-security main multiverse restricted universe\ndeb [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu xenial stable\n# deb-src [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu xenial stable\n# deb-src [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu xenial stable\ndeb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ trusty-updates main multiverse restricted universe\n# deb-src [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu xenial stable\n<\/code><\/pre>\n<p>\u4fdd\u5b58\u9000\u51fa<\/p>\n<pre><code class=\"language-shell\">apt-get update\napt-get install postgresql libpq-dev python-dev<\/code><\/pre>\n<h4>3 notebook\u53bb\u5b89\u88c5\u76f8\u5173\u5305<\/h4>\n<pre><code class=\"language-shell\">pip3 install psycopg2-binary\npip3 install psycopg2<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2022\/05\/image-1653892985243.png\" alt=\"file\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 \u672c\u6587\u63cf\u8ff0notebook\u91cc\u9700\u8981\u5b89\u88c5psycopg2 \u7684\u64cd\u4f5c\u6b65\u9aa4 \u89e3\u51b3\u65b9\u6848 1 \u8fdb\u5165\u5bf9\u5e94\u7684notebo ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=8284\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8284","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/8284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8284"}],"version-history":[{"count":0,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/8284\/revisions"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}