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 참고
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.