Closed FarFromBoston closed 5 years ago
I'm not sure if that will work from Jupyter due to the way the OpenGL window needs to run in a separate thread. Try running the same commands from the command line (outside of Jupyter) and see if it works for you there. If it doesn't work there, then you may just have a configuration issue. If it does work, then there is probably an incompatibility between the Jupyter kernel and python threading.
Using the windows powershell in the folder i tried to import wx and tried to run view_cube(img, bands=[29, 19, 9])
Both came back with:
import wx
File "C:\Users\lewis\Anaconda3\Lib\site-packages\wx__init.py", line 12, in
my 'wx' package is bugged :/
apparently u have to comment a line like below, but i cant find it:
taken from this link: https://github.com/Azure/azure-iot-sdk-python/issues/24
I'm having similar trouble with view_cube()
function. I've been trying to follow the tutorial in the spectral documentation with scripts instead of Jupyter; however, I don't believe that is the intended usage. If I understand the documentation correctly, it is expected to be used with IPython.
As for displaying the hypercube - the note at the bottom of the Hypercube Display section seems to have addressed this for me.
@zspatter, yes the view_cube
function is intended for interactive use so it should be used from the IPython command line.
yeh only jupyter is supposed to work,
i also tried using a cfommand prompt and setting it with ipython --pylab=wx but although everything works (and like in jupyter i can import wx just fine) still view_cube is broken but for a different error this time: module 'wx' has no attribute 'Thread_IsMain'
Unless one of you got it working i really dont think i can be able to get this... oh well. maybe there is conflicting Ipython version with wx?
To clarify im using python 3.7
NameError Traceback (most recent call last)
@Ridhee You need to import the function first:
from spectral.graphics import view_cube
Or just call spectral.view_cube
instead.
Thank you Thomas. It worked
On Wed, 19 May, 2021, 10:09 PM Thomas Boggs, @.***> wrote:
@Ridhee https://github.com/Ridhee You need to import the function first:
from spectral.graphics import view_cube
Or just call spectral.view_cube instead.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spectralpython/spectral/issues/90#issuecomment-844276381, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUD7YG6G7LUA5LYREZ77I4DTOPSVFANCNFSM4H22JMXQ .
Im using the spectral python documentation to learn it: http://www.spectralpython.net/graphics.html
Im up to showing the hypercube but cant figure out whats wrong. I can import everything just fine - I have wxpython and PyOpenGL installed correctly with conda
When i run cell '24' I get the hypercube window as "hypercube not responding" then when i close it i get "Kernal died" I have to then restart Jupyter...
Why cant I see the hypercube? im following the documentation page exactly.