Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
145 views
in Technique[技术] by (71.8m points)

python - Cannot open anaconda suddenly

Today I found I cannot open anaconda navigator, which operated just fine before. At the same time, spyder could not be open either, but jupyter notebook and anaconda prompt are available. I tried different methods following instructions online.

1) conda update anaconda-navigator and reboot the system
2) anaconda-navigator --reset

, but it shows the error as follows:

Traceback (most recent call last):
  File "C:UsersUserAnaconda3libsite-packagesqtpy\__init__.py", line 169, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
ImportError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:UsersUserAnaconda3Scriptsanaconda-navigator-script.py", line 6, in <module>
    from anaconda_navigator.app.main import main
  File "C:UsersUserAnaconda3libsite-packagesanaconda_navigatorappmain.py", line 22, in <module>
    from anaconda_navigator.utils.conda import is_conda_available
  File "C:UsersUserAnaconda3libsite-packagesanaconda_navigatorutils\__init__.py", line 15, in <module>
    from qtpy.QtGui import QIcon
  File "C:UsersUserAnaconda3libsite-packagesqtpy\__init__.py", line 175, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found

(base) C:UsersUserAnaconda3>anaconda-navigator --reset
Traceback (most recent call last):
  File "C:UsersUserAnaconda3libsite-packagesqtpy\__init__.py", line 169, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
ImportError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:UsersUserAnaconda3Scriptsanaconda-navigator-script.py", line 6, in <module>
    from anaconda_navigator.app.main import main
  File "C:UsersUserAnaconda3libsite-packagesanaconda_navigatorappmain.py", line 22, in <module>
    from anaconda_navigator.utils.conda import is_conda_available
  File "C:UsersUserAnaconda3libsite-packagesanaconda_navigatorutils\__init__.py", line 15, in <module>
    from qtpy.QtGui import QIcon
  File "C:UsersUserAnaconda3libsite-packagesqtpy\__init__.py", line 175, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found

So I tried different methods to reinstall pyqt as follows:

1) conda install pyqt
2) conda install --force qt 
3) pip3 install PyQt5

But still not working. I really wonder how I could fix this.

And now when I ran anaconda navigator in the prompt, I got

anaconda: error: argument : invalid choice: 'navigator' (choose from 'auth', 'label', 'channel', 'config', 'copy', 'download', 'groups', 'login', 'logout', 'notebook', 'package', 'remove', 'search', 'show', 'upload', 'whoami')

PS: my python version is 3.5, and anaconda has been updated to the latest version.

PS2-Possible Solution: I ran conda install PySide on prompt and it downgraded some of the packages, where I remembered few days ago I upgraded beautifulsou4, please be very aware when upgrading packages on anaconda !

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...