Cannot use pmw widgets for python

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iborsteins
    New Member
    • Feb 2017
    • 1

    Cannot use pmw widgets for python

    I just installed the pmw widgets package using the included setup.py into my python 2.7.13 site-packages folder. when I try to import pmw from a python console prompt, it causes the following import error:

    File "<stdin>", line 1, in <module>
    ImportError: No module named pmw

    I have looked at the files that were installed and there is no pmw.py. Does anybody know what needs to be done to eliminate this problem?
  • dwblas
    Recognized Expert Contributor
    • May 2008
    • 626

    #2
    First, it is always best to use the distro's native installer instead of downloading from some third party. Pmw is installed in /usr/lib64/python/site-packages on my Slackware box. It may also be in /usr/lib/... or /usr/local/lib(64)... Where ever it is it has to be somewhere in the Python Path. You can print the path with
    Code:
    import sys
    print sys.path
    edit: it is
    import Pmw (note the capital "P")

    Comment

    Working...