書名: Learn Python in 7 Days作者名: Mohit Bhaskar N. Das本章字數: 61字更新時間: 2021-07-09 20:40:20
Setting environment variables in Linux
Linux comes with different types of shells and the Python directory path is usually /usr/local/bin/python:
- csh shell: Open the terminal and enter setenv PATH "$PATH:/usr/local/bin/python" followed by pressing Enter
- bash shell: On the terminal, enter export PATH="$PATH:/usr/local/bin/python" followed by pressing Enter
- sh or ksh shell: Enter PATH="$PATH:/usr/local/bin/python" followed by pressing Enter