{"id":1284,"date":"2022-01-22T14:43:24","date_gmt":"2022-01-22T06:43:24","guid":{"rendered":"https:\/\/dasmz.com\/?p=1284"},"modified":"2022-06-17T15:31:13","modified_gmt":"2022-06-17T07:31:13","slug":"%e5%a4%87%e5%bf%98%e5%bd%95%ef%bc%8cpip3%e5%ae%89%e8%a3%85%e5%8c%85%e6%97%b6%e5%80%99%e7%9a%84%e5%bc%82%e5%b8%b8%e5%a4%84%e7%90%86-2022-1-22","status":"publish","type":"post","link":"https:\/\/dasmz.com\/?p=1284","title":{"rendered":"\u5907\u5fd8\u5f55\uff0cpip3\u5b89\u88c5\u5305\u65f6\u5019\u7684\u5f02\u5e38\u5904\u7406 2022-1-22"},"content":{"rendered":"\n<p>pip3\u5b89\u88c5\u5305\u65f6\u5019\u7684\u5f02\u5e38\u5904\u7406<\/p>\n\n\n\n<p>\u62a5\u9519\u4fe1\u606f\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># pip3 install psycopg2\nCollecting psycopg2\n  Downloading https:\/\/files.pythonhosted.org\/packages\/fd\/ae\/98cb7a0cbb1d748ee547b058b14604bd0e9bf285a8e0cc5d148f8a8a952e\/psycopg2-2.8.6.tar.gz (383kB)\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 389kB 2.3MB\/s \nBuilding wheels for collected packages: psycopg2\n  Running setup.py bdist_wheel for psycopg2 ... error\n  Complete output from command \/usr\/bin\/python3 -u -c \"import setuptools, tokenize;__file__='\/tmp\/pip-build-6opkdiqe\/psycopg2\/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" bdist_wheel -d \/tmp\/tmpcg0csrfqpip-wheel- --python-tag cp35:\n  \/usr\/lib\/python3.5\/distutils\/dist.py:261: UserWarning: Unknown distribution option: 'project_urls'\n    warnings.warn(msg)\n  running bdist_wheel\n  running build\n  running build_py\n  creating build\n  creating build\/lib.linux-x86_64-3.5\n  creating build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/_range.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/sql.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/_lru_cache.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/errorcodes.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/extensions.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/__init__.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/pool.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/_json.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/_ipaddress.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/extras.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/compat.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/tz.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  copying lib\/errors.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n  running build_ext\n  building 'psycopg2._psycopg' extension\n  creating build\/temp.linux-x86_64-3.5\n  creating build\/temp.linux-x86_64-3.5\/psycopg\n  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=\/build\/python3.5-5Cvh2K\/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.8.6 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=140003 -DHAVE_LO64=1 -I\/usr\/include\/python3.5m -I. -I\/usr\/include\/postgresql -I\/usr\/include\/postgresql\/14\/server -c psycopg\/psycopgmodule.c -o build\/temp.linux-x86_64-3.5\/psycopg\/psycopgmodule.o -Wdeclaration-after-statement\n  In file included from psycopg\/psycopgmodule.c:28:0:\n  .\/psycopg\/psycopg.h:36:22: fatal error: libpq-fe.h: No such file or directory\n   #include &lt;libpq-fe.h&gt;\n                        ^\n  compilation terminated.\n  \n  It appears you are missing some prerequisite to build the package from source.\n  \n  You may install a binary package by installing 'psycopg2-binary' from PyPI.\n  If you want to install psycopg2 from source, please install the packages\n  required for the build and try again.\n  \n  For further information please check the 'doc\/src\/install.rst' file (also at\n  &lt;https:\/\/www.psycopg.org\/docs\/install.html&gt;).\n  \n  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  ----------------------------------------\n  Failed building wheel for psycopg2\n  Running setup.py clean for psycopg2\nFailed to build psycopg2\nInstalling collected packages: psycopg2\n  Running setup.py install for psycopg2 ... error\n    Complete output from command \/usr\/bin\/python3 -u -c \"import setuptools, tokenize;__file__='\/tmp\/pip-build-6opkdiqe\/psycopg2\/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" install --record \/tmp\/pip-ki8ms03h-record\/install-record.txt --single-version-externally-managed --compile:\n    \/usr\/lib\/python3.5\/distutils\/dist.py:261: UserWarning: Unknown distribution option: 'project_urls'\n      warnings.warn(msg)\n    running install\n    running build\n    running build_py\n    creating build\n    creating build\/lib.linux-x86_64-3.5\n    creating build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/_range.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/sql.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/_lru_cache.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/errorcodes.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/extensions.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/__init__.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/pool.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/_json.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/_ipaddress.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/extras.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/compat.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/tz.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    copying lib\/errors.py -&gt; build\/lib.linux-x86_64-3.5\/psycopg2\n    running build_ext\n    building 'psycopg2._psycopg' extension\n    creating build\/temp.linux-x86_64-3.5\n    creating build\/temp.linux-x86_64-3.5\/psycopg\n    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=\/build\/python3.5-5Cvh2K\/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.8.6 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=140003 -DHAVE_LO64=1 -I\/usr\/include\/python3.5m -I. -I\/usr\/include\/postgresql -I\/usr\/include\/postgresql\/14\/server -c psycopg\/psycopgmodule.c -o build\/temp.linux-x86_64-3.5\/psycopg\/psycopgmodule.o -Wdeclaration-after-statement\n    In file included from psycopg\/psycopgmodule.c:28:0:\n    .\/psycopg\/psycopg.h:36:22: fatal error: libpq-fe.h: No such file or directory\n     #include &lt;libpq-fe.h&gt;\n                          ^\n    compilation terminated.\n    \n    It appears you are missing some prerequisite to build the package from source.\n    \n    You may install a binary package by installing 'psycopg2-binary' from PyPI.\n    If you want to install psycopg2 from source, please install the packages\n    required for the build and try again.\n    \n    For further information please check the 'doc\/src\/install.rst' file (also at\n    &lt;https:\/\/www.psycopg.org\/docs\/install.html&gt;).\n    \n    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n    \n    ----------------------------------------\nCommand \"\/usr\/bin\/python3 -u -c \"import setuptools, tokenize;__file__='\/tmp\/pip-build-6opkdiqe\/psycopg2\/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" install --record \/tmp\/pip-ki8ms03h-record\/install-record.txt --single-version-externally-managed --compile\" failed with error code 1 in \/tmp\/pip-build-6opkdiqe\/psycopg2\/\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">      copying cffi\/ffiplatform.py -&gt; build\/lib.linux-x86_64-3.7\/cffi\n      copying cffi\/__init__.py -&gt; build\/lib.linux-x86_64-3.7\/cffi\n      copying cffi\/model.py -&gt; build\/lib.linux-x86_64-3.7\/cffi\n      copying cffi\/recompiler.py -&gt; build\/lib.linux-x86_64-3.7\/cffi\n      copying cffi\/api.py -&gt; build\/lib.linux-x86_64-3.7\/cffi\n      copying cffi\/_cffi_include.h -&gt; build\/lib.linux-x86_64-3.7\/cffi\n      copying cffi\/parse_c_type.h -&gt; build\/lib.linux-x86_64-3.7\/cffi\n      copying cffi\/_embedding.h -&gt; build\/lib.linux-x86_64-3.7\/cffi\n      copying cffi\/_cffi_errors.h -&gt; build\/lib.linux-x86_64-3.7\/cffi\n      running build_ext\n      building '_cffi_backend' extension\n      creating build\/temp.linux-x86_64-3.7\n      creating build\/temp.linux-x86_64-3.7\/c\n      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I\/usr\/include\/ffi -I\/usr\/include\/libffi -I\/usr\/include\/python3.7m -c c\/_cffi_backend.c -o build\/temp.linux-x86_64-3.7\/c\/_cffi_backend.o\n      [proxychains] DLL init: proxychains-ng 4.15\n      [proxychains] DLL init: proxychains-ng 4.15\n      c\/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory\n       #include &lt;ffi.h&gt;\n                ^~~~~~~\n      compilation terminated.\n      error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n      ----------------------------------------\n  Command \"\/usr\/bin\/python3 -u -c \"import setuptools, tokenize;__file__='\/tmp\/pip-install-zzoehyo1\/cffi\/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" install --record \/tmp\/pip-record-bowz6rjy\/install-record.txt --single-version-externally-managed --prefix \/tmp\/pip-build-env-31eykgev --compile\" failed with error code 1 in \/tmp\/pip-install-zzoehyo1\/cffi\/\n  \n  ----------------------------------------\nCommand \"\/usr\/bin\/python3 -m pip install --ignore-installed --no-user --prefix \/tmp\/pip-build-env-31eykgev --no-warn-script-location --no-binary :none: --only-binary :none: -i https:\/\/pypi.org\/simple -- setuptools&gt;=40.8.0 wheel \"cffi&gt;=1.4.1; python_implementation != 'PyPy'\"\" failed with error code 1 in None\n<\/pre>\n\n\n\n<p>\u5904\u7406\u529e\u6cd5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-get install build-essential\napt-get install python3-setuptools\napt-get install python3-dev\napt-get install python3-cffi\napt-get install libpq-dev\n\npip3 install --upgrade pip\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"574\" height=\"446\" src=\"https:\/\/dasmz.com\/wp-content\/uploads\/2020\/12\/DONATE.jpg\" alt=\"Donate\" class=\"wp-image-18\"\/><figcaption>\u4e91\u4e5e\u8ba8<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>pip3\u5b89\u88c5\u5305\u65f6\u5019\u7684\u5f02\u5e38\u5904\u7406 \u62a5\u9519\u4fe1\u606f\u5982\u4e0b # pip3 install psycopg2 Collectin [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts\/1284"}],"collection":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1284"}],"version-history":[{"count":4,"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts\/1284\/revisions"}],"predecessor-version":[{"id":2422,"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts\/1284\/revisions\/2422"}],"wp:attachment":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}