gpt4 book ai didi

python - 使用 Python 3.6 执行 make install 时出现警告

转载 作者:行者123 更新时间:2023-12-01 03:21:17 24 4
gpt4 key购买 nike

我下载了 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)
^

有什么需要我小心处理的吗?

最佳答案

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

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

关于python - 使用 Python 3.6 执行 make install 时出现警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41895349/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com