" 1生成警告"从pip3,django和postgresql安装psycopg2之后

时间:2015-07-13 06:27:26

标签: python django 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

为什么我会得到一堆邮件和那个错误?这是正常的吗?

由于

1 个答案:

答案 0 :(得分:1)

这是来自C编译器的警告消息。调用C编译器来构建库所需的本机Python扩展。警告消息通常取决于平台和编译器。如果您没有调试或诊断特定问题,通常可以安全地忽略它们。