Code to clear console and variables in Spyder

(Spyder maintainer here) This code both clears the console and removes all variables present on the namespace at the same time: try: from IPython import get_ipython get_ipython().magic(‘clear’) get_ipython().magic(‘reset -f’) except: pass It also has the advantage that it works inside and outside Spyder. Note: Right now this approach generates an error in the console after … Read more

Cannot open anaconda suddenly

This error means that you installed pyqt5 with pip along side the pyqt conda package. It could be solved by you uninstalling the pip package. Try: pip uninstall PyQt5 Then update conda: conda update conda and conda update anaconda-navigator It will surely resolve your problem.

Python Multiprocessing error: AttributeError: module ‘__main__’ has no attribute ‘__spec__’

The problem is not with the code / Python 3.6, it is with Spyder. After some investigation I found that the code runs fine when executed in an external system terminal but not when run in Spyder’s IPython console. I was able to dump the contents of spec and assign them to a variable that … Read more