행위

Redhat 리눅스에서 파이썬 기본 버전 변경하기

라이언의 꿀팁백과

Ryanyang (토론 | 기여)님의 2023년 1월 7일 (토) 22:13 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

리눅스의 alternatives 명령어는 특정 명령어에 대한 심볼릭 링크를 변경하는 프로그램이다. 이 프로그램을 통해 Redhat 리눅스에서 파이썬 명령어인 python 에 대한 심볼릭 링크를 수정하면 된다. 아래 코드 기준으로 1번째 줄의 sudo alternatives --config python3 을 입력한다. 이어서 10번째 줄처럼 숫자 2 를 입력하면 설정이 끝난다.

sudo alternatives --config python3

There are 2 programs which provide 'python3'.

  Selection    Command
-----------------------------------------------
*  1           /usr/bin/python3.6
 + 2           /usr/bin/python3.8

Enter to keep the current selection[+], or type selection number: 2