
我對 Linux 和軟體開發還比較陌生。我正在嘗試使用 tkinter 和 python 為樹莓派 - arduino 系統建立前端 GUI。我已在電腦上下載並提取了活動 tcl 和 tkinter 的文件,但我無法獲取運行程式和調試所需的庫。我收到這個錯誤。
_tkinter.TclError: Can't find a usable tk.tcl in the following directories:
/usr/local/lib/tcl8.6/tk8.6 /usr/local/lib/tk8.6 /usr/lib/tk8.6 /usr/lib/tk8.6 /lib/tk8.6 /usr/library
我已運行 sudo ./install.sh 並放置在預設資料夾中,並在目錄 /usr/local/lib/ 和 /usr/local/lib/lib/ 中有一個標記為 tcl8.6 的資料夾。我不知道我做錯了什麼,此時我的電腦充滿了未正確下載的庫,我考慮保存我擁有的幾個文件並重置 os.我正在運行elementary os 5.0 juno。
我相信我沒有做任何事:
After installation, make sure that the directory containing the installed executables (ActiveTcl/bin) is included in your PATH variable.
export PATH="/opt/ActiveTcl-8.6/bin:$PATH"
You can also add the man directory to your path to access the man page documentation on the command line.
export PATH="/opt/ActiveTcl-8.6/man:$PATH"
答案1
嘗試sudo apt-get update
更新您的軟體包版本和來源列表,然後sudo apt-get install tk
、sudo apt-get install tcl
、 和sudo apt-get install libtcl8.5
。