可以使用以下方法來查看Python的安裝路徑:
python -c "import sys; print(sys.executable)"
這將輸出Python的可執行文件路徑,即Python的安裝路徑。
import sys print(sys.executable)
這同樣會輸出Python的可執行文件路徑,即Python的安裝路徑。