niazalikhan87 / qutip

Automatically exported from code.google.com/p/qutip
2 stars 1 forks source link

GUIs flashing in iPython #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run about() or demos() in an iPython environment
2.
3.

What is the expected output? What do you see instead?
Expected: stable GUI box
Instead: GUI box appearing and disappearing in the blink of an eye

What version of the product are you using? On what operating system?
1.1.2, Windows 7.

Please provide any additional information below.
No problems in a standard Python environment.

Original issue reported on code.google.com by jonasnee...@gmail.com on 27 Oct 2011 at 5:09

GoogleCodeExporter commented 8 years ago
I will look into this...  It works on the mac in ipython so I am curious as to 
what the problem is.

Original comment by nonhermitian on 28 Oct 2011 at 1:24

GoogleCodeExporter commented 8 years ago
Yes, it's strange. I tried manually running each of the commands in about.py in 
the iPython console -- in that case the box did not disappear, but it also 
didn't respond to Close button clicks.
Anyway, I guess it's not a high-priority bug.

Original comment by jonasnee...@gmail.com on 28 Oct 2011 at 7:01

GoogleCodeExporter commented 8 years ago
which version of pyqt or pyside are you using?

Original comment by nonhermitian on 28 Oct 2011 at 7:04

GoogleCodeExporter commented 8 years ago
PyQt4 ver. 4.8.5

Original comment by jonasnee...@gmail.com on 28 Oct 2011 at 7:11

GoogleCodeExporter commented 8 years ago
I have been talking with the iPython people and they have been quite helpful.  
It seems that there are a variety of issues when using QuTiP in iPython that 
are fixed in the developer version of 0.12.  When Robert and I get a windows 
machine going, then I will see if we can't get all the GUI issues fixed using 
this new version.

Original comment by nonhermitian on 8 Dec 2011 at 12:10

GoogleCodeExporter commented 8 years ago
Cool. Are the issues Windows-specific, or do you also see some on Mac?

Original comment by jonasnee...@gmail.com on 8 Dec 2011 at 12:14

GoogleCodeExporter commented 8 years ago
It seems that they appear on Windows only.  I am running a Mac / virtual 
Ubuntu, and Robert is using only Ubuntu, and we have never seen any issues.

The problem for us is finding a Windows PC to actually test the codes out on.  
We have more or less been relying on your comments up until now to figure out 
the windows stuff.

Paul

Original comment by nonhermitian on 8 Dec 2011 at 12:22

GoogleCodeExporter commented 8 years ago
If you need me to test smaller things, go ahead and ask me! That's of course 
not quite as convenient for you as having a machine handy.

Original comment by jonasnee...@gmail.com on 8 Dec 2011 at 12:42

GoogleCodeExporter commented 8 years ago
Well the most current code can always be checked out from the website.  
However, we have made quite a few changes to the master-equation and 
monte-carlo solvers which are not backward compatible.  For time-dependent 
Hamiltonians, they now require having cython installed as qutip now generates 
its own c-code at runtime (it is super fast now!).  Cython is probably not 
included in the pythonxy package and therefore will require a little more work. 
 So it is probably best for us to get a windows machine working in the near 
future.

However, if you can come up with a good set of instructions on how to install 
everything in windows, then we would love your help!  I haven't used windows in 
ten years so I really have no idea how to get a working python setup going on 
that platform.

Original comment by nonhermitian on 8 Dec 2011 at 1:36

GoogleCodeExporter commented 8 years ago
If you want to get things running on Windows quickly, you can check out the 
Enthought Python Distribution, at http://enthought.com/products/epd.php. It 
comes with many useful things, including cython, and is free for academic use.

Original comment by Markus.B...@gmail.com on 9 Dec 2011 at 1:06

GoogleCodeExporter commented 8 years ago
Do the GUI's flash when using the EPD?

Original comment by nonhermitian on 9 Dec 2011 at 1:18

GoogleCodeExporter commented 8 years ago
Cython is indeed included in the Python(x,y) distribution. To quickly check 
whether it's working as you intend, could you give me an example command to run?
There's a list of included plugins here: 
http://code.google.com/p/pythonxy/wiki/StandardPlugins

Now I don't remember exactly how I got qutip running on my machines, but I'm 
almost certain it was these three steps:

1: Download and install Python(x,y) from http://code.google.com/p/pythonxy/ 
(free for all, Linux version also available).
   It might be that Cython is not installed as a default, so check the included libraries in the installer program.

2: Download and unzip qutip to a temporary folder.

3: In a cmd window, go to the temporary download folder and run the setup 
command, I provided earlier, with the compiler flag set:
   > python setup.py install build --compiler=mingw32

I believe that should work - of course still with the iPython problems 
discussed here. It might also be possible to use easy_install - I haven't tried 
that.

Original comment by jonasnee...@gmail.com on 9 Dec 2011 at 7:05

GoogleCodeExporter commented 8 years ago
Just tested the about() from within ipython on a windows xp and a windows 7 
machine, both run qutip 1.1.3 (patched for issue 10) on EPD 7.1, which provides 
Python 2.7.2, IPython 0.11rc1 and PySide 1.0.5. On both machines the box works 
fine. So it seems to be definitely a problem with PyQt4.

However the about text is a bit cropped on both machines (see attachement). The 
demos() box looks fine

Original comment by Markus.B...@gmail.com on 13 Dec 2011 at 7:36

Attachments:

GoogleCodeExporter commented 8 years ago
That is really odd, the text should be centered.  It fact it is perfectly 
centered on the mac and in linux.  This could be a pyside thing as they did 
some under the hood revisions in going from 1.0.5->1.0.6 that caused 
compatibility issues.  I think I will try to get a windows box running this 
Friday.  

Original comment by nonhermitian on 13 Dec 2011 at 8:04

GoogleCodeExporter commented 8 years ago
This is what I get on the mac...  it say dev but the about box code has not 
changed since 1.1.3

Original comment by nonhermitian on 13 Dec 2011 at 8:06

Attachments:

GoogleCodeExporter commented 8 years ago
I get the same misalignment as in #13, with PySide 1.0.9 (it is 1.0.3 up there).

I have a hard time getting PySide running in iPython, probably because of some 
interference with PyQt4.
If I just start up a standard Python session, 
>>> from qutip import *; about() 
gives a PySide error in the import of QtGui and QtCore:
ImportError: DLL load failed: The specified procedure could not be found

This is the same error I get in iPython when trying to import PySide. On the 
other hand, if I do an import PySide before importing qutip, everything is fine 
(except for the misaligned text).
But this must be a problem with my configuration, not with qutip - PyQt4 
installed prior to installing PySide.

Original comment by jonasnee...@gmail.com on 13 Dec 2011 at 12:09

GoogleCodeExporter commented 8 years ago
I think your problem is an installation issue as it is complaining about a DLL 
not loading which is outside of the python space.

Again, I think today's conversation suggests that Robert and I need to finally 
bite the bullet and setup windows.

However, this text misalignment is strange� I purposely added code in 1.1.3 to 
align the text in the middle of the window.  I am assuming the problem didn't 
exist in earlier versions, so I am expecting that this new code is the cause.

Original comment by nonhermitian on 13 Dec 2011 at 12:19

GoogleCodeExporter commented 8 years ago
I think your problem is an installation issue as it is complaining about a DLL 
not loading which is outside of the python space.

Again, I think today's conversation suggests that Robert and I need to finally 
bite the bullet and setup windows.

However, this text misalignment is strange� I purposely added code in 1.1.3 to 
align the text in the middle of the window.  I am assuming the problem didn't 
exist in earlier versions, so I am expecting that this new is the cause.

Original comment by nonhermitian on 13 Dec 2011 at 12:20

GoogleCodeExporter commented 8 years ago
Problem has been solved.  It turns out that pixel size is not a platform 
independent way to specify GUI text sizes.  Who knew.  Also, I do not get 
flashing GUI's in Windows using the EPD.

Original comment by nonhermitian on 14 Dec 2011 at 2:58

Attachments:

GoogleCodeExporter commented 8 years ago
Does EPD use iPython v0.11? Python(x,y) is still using 0.10, and apparently a 
lot of things happened from 0.10 to 0.11, including the gui support. Probably I 
should just wait and see what happens once the Python(x,y) guys get iPython 
updated.

Original comment by jonasnee...@gmail.com on 14 Dec 2011 at 8:13

GoogleCodeExporter commented 8 years ago
Yes, it does.  Although there are still issues with 0.11.  It seems that we 
must wait for 0.12 (or dl the beta) to fix everything.

Original comment by nonhermitian on 14 Dec 2011 at 10:07