3

I am trying to import Tktable in Python 2.7.

I have put the Tktable.py file within my project folder. Last time, when I was using Canopy, it is working perfectly. After I changed to PyCharm and uninstalled Canopy, a lot of libs went wrong, I have successfully fixed all the others except Tktable.

Can anyone helped me?

Here is the error I got:

File "/Users/XXX/XXX/XXX/project/Tktable.py", line 121, in __init__
    master.tk.call('package', 'require', 'Tktable')
TclError: can't find package Tktable
nbro
  • 15,395
  • 32
  • 113
  • 196
fyr91
  • 1,253
  • 5
  • 17
  • 33

1 Answers1

0

The libraries available from PyCharm depend on your Project Interpreter.

A quick check is to use the Project View (Tool #1), and browse the External Libraries. If the library is not there, you can try to:

  • Add the location of your library, via Preferences.../Project Interpreter/Python Interpreters (paths tab)
  • (Re)install the library from PyCharm, again via Python Interpreters (packages tab).
  • Set another interpreter for your project, if one of them has your library already.

  • Install the library from outside PyCharm, for the right python version.

Arnaud P
  • 12,022
  • 7
  • 56
  • 67