Matplotlib installation with Python(x,y)

I have a system that has Python(x,y)-2.6.6.2.exe installed.
When running the script "file.py" the following error occurs:

/Traceback (most recent call last):
File "file.py", line xx, in <module>
   import <something>
File "includes\something.py", line 31, in <module>
   import matplotlib.pyplot as plt
File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 95, in
<module>
   new_figure_manager, draw_if_interactive, show = pylab_setup()
File "C:\Python26\lib\site-packages\matplotlib\backends\__init__.py", line
25, in pylab_setup
   globals(),locals(),[backend_name])
File "C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4agg.py",
line 12, in <module>
   from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
File "C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4.py",
line 18, in <module>
   import matplotlib.backends.qt4_editor.figureoptions as figureoptions
File
"C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py",
line 11, in <module>
   import matplotlib.backends.qt4_editor.formlayout as formlayout
File
"C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py",
line 51, in <module>
   raise ImportError, "Warning: formlayout requires PyQt4 >v4.3"
ImportError: Warning: formlayout requires PyQt4 >v4.3 /

I think this error message is not related with the real problem, since this
is just an hardcoded string that is displayed in case the import fails
(formlayout.py):
/try:
    from PyQt4.QtGui import QFormLayout
except ImportError:
    raise ImportError, "Warning: formlayout requires PyQt4 >v4.3"/

If I remove this error message the new error message is that he cannot find
the DLL.

If I install matplotlib-1.0.1.win32-py2.6.exe then this error does not occur
anymore.

Could anyone please explain me what is the difference when the matplotlib is
installed via Python(x,y)
or when it is installed separately on top of Python(x,y)?

I saw that there are a few differences on User and System Environment
variable PATH, but I've tried
different combinations and was not able to get rid of this error when the
system does not have the
matplotlib-1.0.1.win32-py2.6.exe installed.

Thank you in advance for your support.
Kind regards,
Antonio

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-installation-with-Python-x-y-tp42149.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Can you copy-and-paste the exact error message? That will offer some clues.

Mike

···

On 10/02/2013 05:35 AM, ajdcds wrote:

I have a system that has Python(x,y)-2.6.6.2.exe installed.
When running the script "file.py" the following error occurs:

/Traceback (most recent call last):
  File "file.py", line xx, in <module>
    import <something>
  File "includes\something.py", line 31, in <module>
    import matplotlib.pyplot as plt
  File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 95, in
<module>
    new_figure_manager, draw_if_interactive, show = pylab_setup()
  File "C:\Python26\lib\site-packages\matplotlib\backends\__init__.py", line
25, in pylab_setup
    globals(),locals(),[backend_name])
  File "C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4agg.py",
line 12, in <module>
    from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
  File "C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4.py",
line 18, in <module>
    import matplotlib.backends.qt4_editor.figureoptions as figureoptions
  File
"C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py",
line 11, in <module>
    import matplotlib.backends.qt4_editor.formlayout as formlayout
  File
"C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py",
line 51, in <module>
    raise ImportError, "Warning: formlayout requires PyQt4 >v4.3"
ImportError: Warning: formlayout requires PyQt4 >v4.3 /

I think this error message is not related with the real problem, since this
is just an hardcoded string that is displayed in case the import fails
(formlayout.py):
/try:
     from PyQt4.QtGui import QFormLayout
except ImportError:
     raise ImportError, "Warning: formlayout requires PyQt4 >v4.3"/

If I remove this error message the new error message is that he cannot find
the DLL.

--
                    _

\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
>>(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

Hi Mike,

thank you for your interest.

If I replace the following statement on formlayout.py:

/try:
    from PyQt4.QtGui import QFormLayout
except ImportError:
    raise ImportError, "Warning: formlayout requires PyQt4 >v4.3"/
  
With this one:

/from PyQt4.QtGui import QFormLayout/

Then the error is the following:

/Traceback (most recent call last):
  File "file.py", line 83, in <module>
    import <something>
  File "includes\something.py", line 31, in <module>
    import matplotlib.pyplot as plt
  File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 95, in
<module>
    new_figure_manager, draw_if_interactive, show = pylab_setup()
  File "C:\Python26\lib\site-packages\matplotlib\backends\__init__.py", line
25, in pylab_setup
    globals(),locals(),[backend_name])
  File
"C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4agg.py", line
12, in <module>
    from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
  File "C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4.py",
line 18, in <module>
    import matplotlib.backends.qt4_editor.figureoptions as figureoptions
  File
"C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py",
line 11, in <module>
    import matplotlib.backends.qt4_editor.formlayout as formlayout
  File
"C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py",
line 53, in <module>
    from PyQt4.QtGui import QFormLayout
ImportError: DLL load failed: The specified procedure could not be found./

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-installation-with-Python-x-y-tp42149p42152.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

It looks like the PyQt4 installation in python(x,y) is somehow broken. If you just open up the python(x, y) interpreter and type

from PyQt4.QtGui import QFormLayout

or

from PyQt4 import QtGui

what happens? If that fails too, I'd say the bug is in python(x, y) (or however PyQt4 got installled there).

Mike

···

On 10/02/2013 09:19 AM, ajdcds wrote:

Hi Mike,

thank you for your interest.

If I replace the following statement on formlayout.py:

/try:
     from PyQt4.QtGui import QFormLayout
except ImportError:
     raise ImportError, "Warning: formlayout requires PyQt4 >v4.3"/
  
With this one:

/from PyQt4.QtGui import QFormLayout/

Then the error is the following:

/Traceback (most recent call last):
   File "file.py", line 83, in <module>
     import <something>
   File "includes\something.py", line 31, in <module>
     import matplotlib.pyplot as plt
   File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 95, in
<module>
     new_figure_manager, draw_if_interactive, show = pylab_setup()
   File "C:\Python26\lib\site-packages\matplotlib\backends\__init__.py", line
25, in pylab_setup
     globals(),locals(),[backend_name])
   File
"C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4agg.py", line
12, in <module>
     from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
   File "C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4.py",
line 18, in <module>
     import matplotlib.backends.qt4_editor.figureoptions as figureoptions
   File
"C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py",
line 11, in <module>
     import matplotlib.backends.qt4_editor.formlayout as formlayout
   File
"C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py",
line 53, in <module>
     from PyQt4.QtGui import QFormLayout
ImportError: DLL load failed: The specified procedure could not be found./

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-installation-with-Python-x-y-tp42149p42152.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
                    _

\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
>>(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

No error message:

···

from PyQt4.QtGui import QFormLayout

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-installation-with-Python-x-y-tp42149p42154.html
Sent from the matplotlib - users mailing list archive at Nabble.com.