spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.2k stars 1.59k forks source link

QWidget: Must construct a QApplication before a QWidget latest Anaconda, Spyder 5.4.3 #21658

Open ninolat opened 8 months ago

ninolat commented 8 months ago

Problem Description

Starting spyder, the window showing spyder loading appears, the red one. Once it is gone, usually when spyder works it will boot up spyder but now nothing happens after it loads. If I open anaconda terminal and type spyder, I get this: (base) C:\Users*** *****>spyder ##removed name for security fromIccProfile: failed minimal tag size sanity QWidget: Must construct a QApplication before a QWidget I have uninstalled qt and pyside and reinstalled, uninstalled and reinstalled spyder, I cannot uninstall spyder in Anaconda Navigator itself as it will give me "Multiple Errors Encountered", but I can conda uninstall spyder and install, I have uninstalled Anaconda distribution and reinstalled yet the error still occurs. I have hunted down any trace of python and anaconda and spyder on my computer, any files related to it and deleted them. I also installed anaconda distribution in a different location yet the error remains. It make zero sense to me!

Also I will say what happened when this error first occured. I was trying out pyqt, I installed pyqt6 and pyside 6 and uninstalled pyqt5, I opened pyqt designer and made a ui I wanted to try as a .ui file I converted into a .py file. After that I did some more stuff in qt designer and this time instead of making a .ui file and converting using anaconda prompt, I clicked this option in qt designer to show python code, I copied the code and pasted into python. Then I closed and opened spyder and that's when the issue first occured! I have tried everything I even know is possible and I just cannot get it to work! I have spyder --reset and updated spyder with conda as well

What steps reproduce the problem?

  1. Starting spyder from Anaconda Navigator.
  2. Starting spyder in anaconda prompt which actually gives errors.
  3. Trying to uninstall spyder in Anaconda Navigator results in "Multiple Errors Encountered".

Versions

ninolat commented 8 months ago

I'd love to just be able to uninstall it and restart so I can get back to spyder, I am learning python and vscode/vs/pycharm where you open projects to open a new file just compare to using spyder. Help would be appreciated!

ninolat commented 8 months ago
dalthviz commented 2 months ago

Hi @ninolat thank you for the feedback and sorry for such a late response! I think the issue you are/were experiencing could be caused due to a faulty installation of things on your conda base environment. Maybe a look to the Spyder docs troubleshooting guide could be worthy (https://docs.spyder-ide.org/current/troubleshooting/). I think this is not directly related with Spyder but let us know if the info there helps!