使用: bash sudo apt-get install python3-dev 这会重新编译Python,链接到刚安装的libtk8.6库,添加Tkinter支持。 安装完成后,重新打开Python交互环境,导入tkinter就可以成功了: python
sudo apt-get install python3.10-tk python3-dev if the above command doesn't solve,after hours of despair i found this topichow to install tkinter for python 3.8, there is this tutorial basically i solved my problem by doing this:
1.更新软件源 $sudo apt-get update $sudo apt upgrade 2.安装依赖软件包 ##下面是整个一条命令 $sudo apt install --no-install-recommends git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file ma...
再执行 apt-get install linux-source 的话提示 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 linux-source 已经是最新的版本。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 17 个软件包未被升级。 /usr/src/还是没有文件 分享12赞 linux吧 up...
目录1.安装必要编译工具2.安装tcl8.53.安装tk8.54.安装gcc54.1检查gcc版本4.2安装gcc54.3更改gcc/g++优先级5.安装ns26.配置环境变量7.测试ns2 此教程适用于ubuntu系统和国产的统信UOS操作系统,不过在使用UOS时,安装第三方软件需要打开开发者模式。1.安装必要编译工具sudoapt-get install build-essential - ...