Tony Chung Blog

此部落格是作為工作紀錄之用, 免得到處搜尋, 這裡試一下, 那裏試一下, 浪費寶貴時間.

2021年11月11日 星期四

How to make 'python' program command execute Python 3?

/usr/bin/env: ‘python’: No such file or directory

 

Method 1: (This method is failed to "#! /usr/bin/env")

   putting alias in the user's ~/.bashrc

   example:

   alias python=python3


Method 2: (This method is OK to "#! /usr/bin/env")

  $ whereis python3

  $ ls -lisa /usr/bin/python*

  $ sudo ln -s /usr/bin/python3 /usr/bin/python


Method 3:

  $ sudo apt install python-is-python3

張貼者: TonyChung 於 下午4:39 沒有留言:
以電子郵件傳送這篇文章BlogThis!分享至 X分享至 Facebook分享到 Pinterest
較新的文章 較舊的文章 首頁
訂閱: 文章 (Atom)

關於我自己

TonyChung
檢視我的完整簡介

網誌存檔

  • ►  2022 (11)
    • ►  3月 (10)
    • ►  1月 (1)
  • ▼  2021 (4)
    • ►  12月 (1)
    • ▼  11月 (1)
      • How to make 'python' program command execute Pytho...
    • ►  10月 (2)
  • ►  2020 (3)
    • ►  12月 (2)
    • ►  11月 (1)
  • ►  2019 (10)
    • ►  11月 (2)
    • ►  9月 (1)
    • ►  7月 (2)
    • ►  6月 (1)
    • ►  3月 (3)
    • ►  2月 (1)
  • ►  2018 (9)
    • ►  12月 (2)
    • ►  8月 (1)
    • ►  7月 (1)
    • ►  3月 (3)
    • ►  1月 (2)
  • ►  2017 (38)
    • ►  12月 (1)
    • ►  11月 (13)
    • ►  10月 (6)
    • ►  9月 (6)
    • ►  8月 (10)
    • ►  7月 (2)
輕柔雅緻主題. 技術提供:Blogger.