![我在使用下載的庫進行 python gui 應用程式建置時遇到問題](https://rvso.com/image/1601141/%E6%88%91%E5%9C%A8%E4%BD%BF%E7%94%A8%E4%B8%8B%E8%BC%89%E7%9A%84%E5%BA%AB%E9%80%B2%E8%A1%8C%20python%20gui%20%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F%E5%BB%BA%E7%BD%AE%E6%99%82%E9%81%87%E5%88%B0%E5%95%8F%E9%A1%8C.png)
我對 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
。