Ronn Kling New Member
Posts:5  
05 Jan 2023 04:40 AM |
|
I'm trying to bring up a matplotlib graph and cannot get past creating the figure. I get the same error when calling it from a .pro or using >>> to put the console into python mode >>> >>> import matplotlib.pyplot as plt % Loaded DLM: PYTHON39. >>> plt.figure(0) The I get a window that says (wish I could paste an image here) This application failed to start because it could not find or load the Qt plaform "windows" in "", Reinstalling the application may fix the problem Pressing OK then kills IDL
|
|
|
|
Ronn Kling New Member
Posts:5  
06 Jan 2023 04:43 AM |
|
The reason I need this , is that I am trying to call a python routine that someone else wrote from IDL.. I did try this on another machine and got the same error.
|
|
|
|
Ben Castellani Basic Member
Posts:130  
06 Jan 2023 09:42 AM |
|
Displaying matplotlib plots through the bridge should work fine. I just confirmed it does with Python 3.10 on Windows 11 with IDL 8.8.3. Your error message indicates Python cannot find the QT plugin which is something required by matplotlib. Are you even able to make plots directly from Python (not in the bridge)? The fix here is going to be setting the QT_PLUGIN_PATH environment variable. Here is the typical location if using Anaconda on Windows. You'll need to configure it correctly for your setup though: QT_PLUGIN_PATH = C:\Users{YOUR_USERNAME}\Anaconda3\Library\plugins
|
|
|
|
Ronn Kling New Member
Posts:5  
07 Jan 2023 04:48 AM |
|
Well, I figured it out. You have to create a directory in bin..x86_64 called platforms C:\Program Files\Harris\ENVI56\IDL88\bin\bin.x86_64 then find qwindows.dll,mine was in C:\Users\klingr\anaconda3\Library\plugins\platforms And that brings up the matplotlib grapjhic.
|
|
|
|