"-bash: python: command not found"의 두 판 사이의 차이

(새 문서: ==개요== ;<nowiki>-bash: python: command not found</nowiki> ;python installed in ubuntu but python command not found <syntaxhighlight lang='console'> root@wsl:~# python -V -bash: p...)
 
 
36번째 줄: 36번째 줄:


[[분류: Python]]
[[분류: Python]]
[[분류: command not found]]

2022년 8월 30일 (화) 11:23 기준 최신판

1 개요[ | ]

-bash: python: command not found
python installed in ubuntu but python command not found
Console
Copy
root@wsl:~# python -V
-bash: python: command not found
root@wsl:~# python3 -V
Python 3.9.2

2 방법1: alias 등록[ | ]

Console
Copy
root@wsl:~# echo alias python='python3' >> ~/.bashrc
root@wsl:~# source ~/.bashrc
Docker is running.
root@wsl:~# python -V
Python 3.9.2

3 방법2: 심볼릭링크 생성[ | ]

Console
Copy
root@wsl:~# which python3
/usr/bin/python3
root@wsl:~# ln -s /usr/bin/python3 /usr/bin/python
root@wsl:~# python -V
Python 3.9.2

4 같이 보기[ | ]

5 참고[ | ]