使用Python 3.6执行make install时发出警告

时间:2017-01-27 13:41:21

标签: python python-3.x makefile python-3.6

我下载了python 3.6并尝试执行通常的./configure && make install

我收到了这些警告:

/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)
                  ^

我需要小心处理的事情吗?

1 个答案:

答案 0 :(得分:2)

已解决安装这些软件包的问题:

sudo apt-get install libffi6 libffi-dev

然后我可以像往常一样安装Python 3.6:

PYTHON_VERSION=3.6.0    
wget "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz" \
  && tar xzf "Python-$PYTHON_VERSION.tgz" \
  && cd "Python-$PYTHON_VERSION" \
  && ./configure > /dev/null \
  && make altinstall > /dev/null 

为了便于记录:我使用altinstall来保存Python 2.7(预先安装在ubuntu 16.10上)并且能够使用Python 3.x.

我可以发票“旧”python:

python

或者新的python

python3.6