相关疑难解决方法(0)

无法安装/导入 tkinter

我遇到了一个非常令人困惑的问题:

我使用 tkinter 构建了一个 python 程序。然后我将我的 ubuntu 13.10 (amd64) 升级到 ubuntu 14.04 LTS,现在我尝试运行我的 tkinter 程序。我的编译器告诉我

ImportError: No module named tkinter
Run Code Online (Sandbox Code Playgroud)

(与 Tkinter 或 tk/Tk 相同)然后我尝试使用 pip 重新安装 tkinter:

$ pip install tkinter


Could not find any downloads that satisfy the requirement tkinter
   Cleaning up...
   No distributions at all found for tkinter
Run Code Online (Sandbox Code Playgroud)

再次与 Tkinter、tkinter、tk 和 Tk 相同

所以发生了什么事?我必须运行类似的东西吗

$ pip update
Run Code Online (Sandbox Code Playgroud)

(因为 tk 不再在 pip-repository 中)但是为什么它不再安装在我的电脑上?

编辑:1. 我没有 root 访问权限 2. 在 pip.log 中是

>

  Downloading/unpacking tk   Getting page
> https://pypi.python.org/simple/tk/ …
Run Code Online (Sandbox Code Playgroud)

python3 14.04 pip

18
推荐指数
2
解决办法
8万
查看次数

标签 统计

14.04 ×1

pip ×1

python3 ×1