蒹葭苍苍,白露为霜。
所谓伊人,在水一方。

Centos 7编译Python 3.6出现警告解决办法

Centos默认安装的是Python2,所以一般会去安装Python3。所以往往需要自己去官方下载Python3来编译安装。具体安装过程,网上一堆,就不多说了。

这里说一下,编译过程中容易出现被忽略的警告的信息。因为即使出现警告,后续也不会影响Pyhton3安装的,据说也不会影响python使用。但如果你有强迫症,那么可以用如下办法解决。

解决办法:编译前先执行安装:yum install -y libffi libffi-devel

之后再编译,一般就不会出现警告了。

以下是出现的警告信息:

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c: In function 'classify_argument':

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c:195:18: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]

FFI_ASSERT (0);

^

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c:224:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

for (i = 0; i < words; i++)

^

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c:245:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

for (i = 0; i < num; i++)

^

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c:264:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

for (i = 1; i < words; i++)

^

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c:270:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

for (i = 0; i < words; i++)

^

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c: In function 'examine_argument':

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c:323:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

for (i = 0; i < n; ++i)

^

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c: In function 'ffi_call':

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c:484:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

for (j = 0; j < n; j++, a += 8, size -= 8)

^

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c: In function 'ffi_closure_unix64_inner':

/usr/src/Python-3.6.0/Modules/_ctypes/libffi/src/x86/ffi64.c:659:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

for (j = 0; j < n; j++, a += 8)

 

赞(0) 打赏
未经允许不得转载:酷居科技 » Centos 7编译Python 3.6出现警告解决办法

评论 1

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    写的很好,很喜欢

    文娱帝国 3年前 (2019-03-30) 来自天朝的朋友 回复

锦瑟无端五十弦,一弦一柱思华年

酷居科技联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏