簡體   English   中英

從pip3,django和postgresql安裝psycopg2之后,“產生了1條警告”

[英]“1 warning generated” after installing psycopg2 from pip3, django and postgresql

我正在學習django,正在嘗試使用postgresql,並且需要安裝psycopg2模塊。

當我sudo pip install psycopg2我得到這個:

The directory '/Users/hello/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/hello/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting psycopg2
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading psycopg2-2.6.1.tar.gz (371kB)
    100% |████████████████████████████████| 372kB 381kB/s 
Building wheels for collected packages: psycopg2
  Running setup.py bdist_wheel for psycopg2
  Stored in directory: /Users/hello/Library/Caches/pip/wheels/e2/9a/5e/7b620848bbc7cfb9084aafea077be11618c2b5067bd532f329
Successfully built psycopg2
Installing collected packages: psycopg2
Successfully installed psycopg2-2.6.1

然后當我做sudo pip3 install psycopg2

我收到更多消息,但我注意到此消息:

In file included from psycopg/bytes_format.c:81:
In file included from ./psycopg/psycopg.h:33:
./psycopg/config.h:71:13: warning: unused function 'Dprintf' [-Wunused-function]
static void Dprintf(const char *fmt, ...) {}
            ^
1 warning generated.
In file included from psycopg/bytes_format.c:81:
In file included from ./psycopg/psycopg.h:33:
./psycopg/config.h:71:13: warning: unused function 'Dprintf' [-Wunused-function]
static void Dprintf(const char *fmt, ...) {}
            ^
1 warning generated.

而且我認為這種情況會重復出現……但是最后,它說Successfully installed psycopg2-2.6.1

為什么會收到一堆消息和該錯誤? 那是正常的嗎?

謝謝

這是來自C編譯器的警告消息。 調用C編譯器來構建該庫所需的本機Python擴展。 警告消息通常取決於平台和編譯器。 如果不調試或診斷特定問題,通常可以放心地忽略它們。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM