Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
Thank you Mike, Werner and Benjamin for the good, and very fast, support. Kind regards, Antonio -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-installation-with-Python-x-y-tp42149p42178.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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
On Thu, Oct 3, 2013 at 9:22 AM, ajdcds wrote: > Benjamin, thank you very much for the tip! > > If I do > > import matplotlib > matplotlib.use("TkAgg") > > This is only valid for the current script that is running, the matplotlibrc > remains the same, right? > > Yes, that is correct. -- 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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
Benjamin, thank you very much for the tip! If I do import matplotlib matplotlib.use("TkAgg") This is only valid for the current script that is running, the matplotlibrc remains the same, right? -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-installation-with-Python-x-y-tp42149p42170.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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
On Thu, Oct 3, 2013 at 6:35 AM, ajdcds wrote: > Sorry, of course it does not work, the import is incorrect! > > It should be > > import matplotlib as plt > plt.rcParams['backend'] = 'TkAgg' > > or simply > import matplotlib > matplotlib.rcParams['backend'] = 'TkAgg' > > Errr... no, don't do "import matplotlib as plt". That is just confusing. To change backends, do the following: import matplotlib matplotlib.use("TkAgg") Because backends are loaded upon import of matplotlib, changing the rcParam after importing matplotlib is too late. You force a switch of the backend via the "use()" function. -- 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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
Sorry, of course it does not work, the import is incorrect! It should be import matplotlib as plt plt.rcParams['backend'] = 'TkAgg' or simply import matplotlib matplotlib.rcParams['backend'] = 'TkAgg' -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-installation-with-Python-x-y-tp42149p42167.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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
We were able to find the difference when installing Matplotlib via Python(x,y) or as a separate package. The difference is on paramater /backend/ on /matplotlibrc/ file. /Python(x,y)-2.6.6.2.exe/ set the parameter to *Qt4Agg* /matplotlib-1.0.1.win32-py2.6.exe/ sets the parameter to *TKAgg* if backend : TKAgg then the error / File "C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py", line 51, in raise ImportError, "Warning: formlayout requires PyQt4 >v4.3" ImportError: Warning: formlayout requires PyQt4 >v4.3/ Does not appear anymore. Now looking how to use TKAgg without changing the matplotlibrc. I've tried: import matplotlib.pyplot as plt plt.rcParams['backend'] = 'TkAgg' But doesn't see to work. Any suggestions? -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-installation-with-Python-x-y-tp42149p42166.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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
Hi, On 03/10/2013 09:31, ajdcds wrote: > If doing > > c:\Python26\python.exe file.py > > Then the error is on import private files, stated on my first post as > /import / I didn't see a response from you on this: c:\Python26\python.exe from PyQt4.QtGui import QFormLayout Does this give an import error? If above does not give an import error can you try: c:\Python26\python.exe folder_with_matplot_examples/user_interfaces/embedding_in_qt4.py If this works then I am guessing that your 'file.py' does somehow manipulate the sys.path. Werner -- 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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
If doing c:\Python26\python.exe file.py Then the error is on import private files, stated on my first post as /import / -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-installation-with-Python-x-y-tp42149p42164.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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
Hi Antonio, (forgot to copy list - for archive) On 02/10/2013 17:05, António de Sousa wrote: Hi Werner, thank you for your reply. Yes, the path is C:\Python26\lib\ Can it be that the error message is coming from a different location? Meaning that there may be duplicate files (e.g. python related DLLs) in the system? I am guessing/suspecting that you don't always run the Python version you think you are running. So, just to double check, if you do: c:\Python26\python.exe from PyQt4.QtGui import QFormLayout You get no error? 'file.py' is your script which runs matplotlib, yes? if above gives no error what happens if you do: c:\Python26\python.exe file.py Werner -- 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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
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. -- 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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
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 > import >File "includes\something.py", line 31, in > import matplotlib.pyplot as plt >File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 95, in > > 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 > from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\ >File "C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4.py", > line 18, in > import matplotlib.backends.qt4_editor.figureoptions as figureoptions >File > "C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py", > line 11, in > import matplotlib.backends.qt4_editor.formlayout as formlayout >File > "C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py", > line 53, in > 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 > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- _ |\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _ | ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | | http://www.droettboom.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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
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 import File "includes\something.py", line 31, in import matplotlib.pyplot as plt File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 95, in 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 from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\ File "C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4.py", line 18, in import matplotlib.backends.qt4_editor.figureoptions as figureoptions File "C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py", line 11, in import matplotlib.backends.qt4_editor.formlayout as formlayout File "C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py", line 53, in 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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib installation with Python(x,y)
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 > import > File "includes\something.py", line 31, in > import matplotlib.pyplot as plt > File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 95, in > > 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 > from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\ > File "C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4.py", > line 18, in > import matplotlib.backends.qt4_editor.figureoptions as figureoptions > File > "C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py", > line 11, in > import matplotlib.backends.qt4_editor.formlayout as formlayout > File > "C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py", > line 51, in > 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. Can you copy-and-paste the exact error message? That will offer some clues. Mike -- _ |\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _ | ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | | http://www.droettboom.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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users