Centos 7上可能存在python3.8生成问题

2024-05-15 04:47:36 发布

您现在位置:Python中文网/ 问答频道 /正文

我在Centos 7.7的原始安装上构建了python3.8,途径是:

CXX="/usr/bin/g++"
export CXX

./configure LDFLAGS="-static -static-libgcc" CPPFLAGS="-static" \
            --enable-optimizations \
            --prefix=/opt/python38 \
            --enable-shared     \
            --enable-static     \
            --with-system-expat \
            --with-system-ffi   \
            --with-ensurepip=yes

snaptime=`date +%Y%m%d.%H%M`
/usr/bin/make -j `nproc` 2>&1 | /usr/bin/tee log.${snaptime}

echo "remember to 'make altinstall' to avoid overwriting your system python"

接下来,我尝试通过“pyinstaller”构建一个独立的可执行文件你好.py““

我收到以下输出/错误:

^{pr2}$

当我检查我的构建目录时,可以肯定的是指定的文件(libpython3.8.so.1.0、libpython3.8m.so.1.0、libpython3.8m.so、libpython3.8)穆。索.1.0)不存在于我的构建目录中,也不存在于我的/usr/lib和/usr/lib64目录中。在

另外,在根目录中,我运行了“cd'/'和&find”。|grep-i libpython3.8”,并收到一行输出->

/home/usr/python3.8/Python-3.8.0/libpython3.8.a

因为我在./configure命令行上都有--enable shared和--enable static,所以我希望.a和.so文件都是在build和altinstall中生成的,但这显然没有发生。在

我也知道问题可能出在“pyinstaller”上——也许它还不能使用python 3.5以上的版本?在

评论?建议?问题?在


Tags: to目录makebinenableconfigureusrwith

热门问题