ubuntu 18 上编译python3.7/ 3.8

in #note-timknip4 years ago

自己编译最新的稳定版,坑多

File "/usr/local/lib/python3.7/ctypes/__init__.py", line 7, in <module>
        from _ctypes import Union, Structure, Array
    ModuleNotFoundError: No module named '_ctypes'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

编译python前需要安装libffi

apt install libffi-dev

通常的make && make install 会运行2-3小时的测试,非常慢,可以这样跳过测试:

make -j8 build_all
make -j8 altinstall

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.032
BTC 61672.72
ETH 2996.85
USDT 1.00
SBD 3.78