Results 1 to 4 of 4

Thread: ImportError: No module named qwt_thermo

  1. #1
    Join Date
    Mar 2015
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11

    Default ImportError: No module named qwt_thermo

    Hello everyone

    Im using Ubuntu 12.04 and creating my .ui with Qt Designer with Python 2.7.

    My problem is when I want to put some Qwt Widgets, for example: QwtThermo.

    On my code I have import:

    from PyQt4.Qt import *
    from PyQt4.Qwt5 import *

    and downloaded from ubuntu software Qt widgets library.

    File "/opt/ros/hydro/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 257, in loadUi
    return _loadUi(uifile, baseinstance, custom_widgets)
    File "/opt/ros/hydro/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 156, in _loadUi
    return uic.loadUi(uifile, baseinstance=baseinstance)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/__init__.py", line 221, in loadUi
    return DynamicUILoader().loadUi(uifile, baseinstance)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/Loader/loader.py", line 71, in loadUi
    return self.parse(filename, basedir)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 929, in parse
    actor(elem)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 770, in createUserInterface
    self.traverseWidgetTree(elem)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 748, in traverseWidgetTree
    handler(self, child)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 224, in createWidget
    self.traverseWidgetTree(elem)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 748, in traverseWidgetTree
    handler(self, child)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 224, in createWidget
    self.traverseWidgetTree(elem)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 748, in traverseWidgetTree
    handler(self, child)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 215, in createWidget
    self.stack.push(self.setupObject(widget_class, parent, elem))
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 176, in setupObject
    obj = self.factory.createQObject(clsname, name, args, is_attribute)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/objcreator.py", line 105, in createQObject
    classType = self.findQObjectType(classname)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/objcreator.py", line 115, in findQObjectType
    w = module.search(classname)
    File "/usr/lib/python2.7/dist-packages/PyQt4/uic/Loader/qobjectcreator.py", line 87, in search
    self._modules[module] = __import__(module, {}, {}, (cls,))
    ImportError: No module named qwt_thermo

    I'dont know whats wrong
    Thanks for your time.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: ImportError: No module named qwt_thermo

    Have you installed both the Qwt library and the PyQwt package?

  3. #3
    Join Date
    Mar 2015
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11

    Default Re: ImportError: No module named qwt_thermo

    I installed : PyQwt-4.2.3 and when install Qwt library i put : CONFIG+=qwt on my qwt.pro file.
    and on my bashrc the line: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/Desktop/qwt/qwt-6.0.1/lib/


    Added after 6 minutes:


    qwt.pro file.

    ################################################## ##############
    # Qwt Widget Library
    # Copyright (C) 1997 Josef Wilgen
    # Copyright (C) 2002 Uwe Rathmann
    #
    # This library is free software; you can redistribute it and/or
    # modify it under the terms of the Qwt License, Version 1.0
    ################################################## ##############

    include( qwtconfig.pri )

    TEMPLATE = subdirs
    CONFIG += ordered
    CONFIG+=qwt
    SUBDIRS = \
    src \
    textengines

    contains(QWT_CONFIG, QwtDesigner ) {
    SUBDIRS += designer
    }

    contains(QWT_CONFIG, QwtExamples ) {
    SUBDIRS += examples
    }

    qwtspec.files = qwtconfig.pri qwt.prf
    qwtspec.path = $${QWT_INSTALL_FEATURES}

    INSTALLS += qwtspec

    INCLUDEPATH += /usr/include/qwt-qt4

    LIBS += -l qwt-qt4
    Last edited by asturnebur; 4th March 2015 at 09:23.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: ImportError: No module named qwt_thermo

    What does the Qwt pro file have to do with it?

    Exactly which version of Ubuntu? Exactly which packages? The chances seem good that the bindings you have for Python are linked against a particular Qwt 5 version (probably 5.2.1).

Similar Threads

  1. ImportError: Cannot import name
    By wanmonk in forum Qt Programming
    Replies: 4
    Last Post: 16th December 2013, 06:32
  2. Replies: 2
    Last Post: 16th June 2013, 06:57
  3. Named pipes in Qt
    By xenko in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2012, 10:05
  4. Named Mutex in QT
    By doggrant in forum Qt Programming
    Replies: 1
    Last Post: 26th July 2011, 13:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.