출처
Python 3.7 설치
Python을 설치하기 전에 Python을 빌드하는 데 필요한 필수 패키지를 설치
Python 소스 다운로드
Python 빌드
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--without-ensurepip
test_array test_base64 test_binascii test_binhex test_binop test_bytes test_c_locale_coercion \
test_class test_cmath test_codecs test_compile test_complex test_csv test_decimal test_dict \
test_float test_fstring test_hashlib test_io test_iter test_json test_long test_math test_memoryview \
test_pickle test_re test_set test_slice test_struct test_threading test_time test_traceback test_unicode'
... 생략 ...
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _dbm _lzma
_sqlite3
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc atexit pwd
time
running build_scripts
copying and adjusting /home/pi/Python-3.7.7/Tools/scripts/pydoc3 -> build/scripts-3.7
copying and adjusting /home/pi/Python-3.7.7/Tools/scripts/idle3 -> build/scripts-3.7
copying and adjusting /home/pi/Python-3.7.7/Tools/scripts/2to3 -> build/scripts-3.7
copying and adjusting /home/pi/Python-3.7.7/Tools/scripts/pyvenv -> build/scripts-3.7
changing mode of build/scripts-3.7/pydoc3 from 644 to 755
changing mode of build/scripts-3.7/idle3 from 644 to 755
changing mode of build/scripts-3.7/2to3 from 644 to 755
changing mode of build/scripts-3.7/pyvenv from 644 to 755
renaming build/scripts-3.7/pydoc3 to build/scripts-3.7/pydoc3.7
renaming build/scripts-3.7/idle3 to build/scripts-3.7/idle3.7
renaming build/scripts-3.7/2to3 to build/scripts-3.7/2to3-3.7
renaming build/scripts-3.7/pyvenv to build/scripts-3.7/pyvenv-3.7
make[1]: Leaving directory '/home/pi/Python-3.7.7'
Python 3.7 설치
\( \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \) -exec rm -rf '{}' +
&& sudo ln -s idle3 idle \
&& sudo ln -s pydoc3 pydoc \
&& sudo ln -s python3 python \
&& sudo ln -s python3-config python-config
pip 설치
설치 확인
Python 3.7.7
pip 20.0.2 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)