16

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:\Users\User\Anaconda3\lib\site-packages\qtpy\__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:\Users\User\Anaconda3\Scripts\anaconda-navigator-script.py", line 6, in <module>
    from anaconda_navigator.app.main import main
  File "C:\Users\User\Anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 22, in <module>
    from anaconda_navigator.utils.conda import is_conda_available
  File "C:\Users\User\Anaconda3\lib\site-packages\anaconda_navigator\utils\__init__.py", line 15, in <module>
    from qtpy.QtGui import QIcon
  File "C:\Users\User\Anaconda3\lib\site-packages\qtpy\__init__.py", line 175, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found

(base) C:\Users\User\Anaconda3>anaconda-navigator --reset
Traceback (most recent call last):
  File "C:\Users\User\Anaconda3\lib\site-packages\qtpy\__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:\Users\User\Anaconda3\Scripts\anaconda-navigator-script.py", line 6, in <module>
    from anaconda_navigator.app.main import main
  File "C:\Users\User\Anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 22, in <module>
    from anaconda_navigator.utils.conda import is_conda_available
  File "C:\Users\User\Anaconda3\lib\site-packages\anaconda_navigator\utils\__init__.py", line 15, in <module>
    from qtpy.QtGui import QIcon
  File "C:\Users\User\Anaconda3\lib\site-packages\qtpy\__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 !

8
  • Did you install any software or packages since you last used any of the services? For example, Nvidia Drivers are known to cause problems with Qt.
    – dennlinger
    Jul 20, 2018 at 5:30
  • I install updated version of matplotlib and zipline few days ago, I don't know if they cause the problem, if it is, how I should fix it?
    – exteral
    Jul 20, 2018 at 5:31
  • try removing these packages, and see if it works then. I doubt that other conda packages caused the problem, but it might still be worth a shot.
    – dennlinger
    Jul 20, 2018 at 5:32
  • Also have you tried fully removing anaconda-navigator, and then adding it again? I know it sounds stupid, and a hard reset should do the same, but you never know ;-)
    – dennlinger
    Jul 20, 2018 at 5:33
  • you mean reinstall anaconda-navigator?
    – exteral
    Jul 20, 2018 at 5:36

14 Answers 14

40

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.

3
  • In my case, updating navigator removed all environments other than base(root)
    – S.N
    Nov 6, 2019 at 10:38
  • Thank you, this helped me. However, I have to do these 3 steps after every reboot. Are you aware of a possibility to solve this for good?
    – linus
    Mar 4, 2021 at 8:22
  • Thanks for posting, but did not work for me. Still getting errors, will not launch.
    – MikeRoger
    Nov 1, 2021 at 18:42
5

I tried all the solutions listed here but they didn't work for me. Later I was able to resolve the issue. Even though your solutions didn't directly solve my issue, the steps I used to solve it were based on the answers I found here. I will now list the steps I used to solve my issue:

  1. python -V # I checked the python version to make sure it's python 3.4 and above
  2. conda update conda
  3. conda update anaconda-navigator
  4. pip install PySide2
  5. pip uninstall pyqt
  6. pip uninstall PyQt5

Now when doing step 5&6 both pyqt and PyQt5 were not installed on the system, which was the cause of the issue

  1. pip install qtpy # This module was already installed on the system
  2. pip install PyQt5 # This was the final step that solved the issue
1
  • Thanks for posting, but did not work for me. Still getting errors, will not launch.
    – MikeRoger
    Nov 1, 2021 at 18:43
2

I tried all the answers provided. Some steps worked some didn't. So I will just tell all the steps which finally after many trials and fails worked for me:

  1. cd C:\Users\UserName\Anaconda\Scripts
  2. pip install PySide2
  3. pip uninstall PyQt5
  4. pip uninstall pyqt (on this I got this error- WARNING: Skipping pyqt as it is not installed. So not sure if this is helpful)
  5. conda update conda
  6. conda update
  7. anaconda-navigator
1
  • I've been struggling with this problem for two days and finally this worked Jul 16, 2021 at 8:36
1

I had exactly this problem. Same error message and all.

To fix I first updated Conda:

$ conda update conda

Then updated the navigator

$ conda update anaconda-navigator

This performed an integrity check (though it took a while - you have to be patient) and found that the environment was inconsistent. It created a package plan to download and install new packages and updates as well as downgrade some packages. It asked me to approve the change before performing the change and updating the specs. Having approved it, all was performed flawlessly and I was able to relaunch Anaconda navigator without a problem.

0

I just had a similar problem with Navigator. I typed anaconda-navigator on the command line and it opened fine. This doesn't explain why it won't open from the icon but does offer a work-around.

0

Currently I have two anaconda prompt windows open on my screen, one normal, and one that is running as an Admin.

When I try 'anaconda-navigator' in the normal window, I get the same errors as you.

When I try the same command in the admin rights window, then it all works.

This isn't really a fix, but it might point someone more experienced in the right direction.

1
  • Extra details: I had just experienced the same thing with anaconda suddenly not working. I updated both anaconda and spyder 'conda update conda' and 'conda update spyder'. Anaconda still didn't seem to work after this, but did work when run as an administrator.
    – NAP_time
    Feb 28, 2019 at 12:44
0

The real fix that worked for me was to install the module that was causing the error, that is the PySide module. Do not install PySide (pip install PySide) unless you are using Python 3.4 or less. If you are running Python 3.4 and up (up to 3.7), you need to install PySide2 (pip install PySide2).

None of the other answers worked for me at all because the error was the same all over again.

0

Uninstalled PyQt5

pip uninstall PyQt5

and installed qtpy

pip install qtpy

worked for me

0

Run these one by one, it worked for me:

pip uninstall pyqt
pip uninstall PyQt5
conda update conda
conda update anaconda-navigator
1
  • How did it work? What does the command do? How is it different from OP's code?
    – 10 Rep
    Oct 15, 2020 at 0:55
0

I had a similar problem with Anaconda Navigator and Spyder. This commands on the anaconda prompt worked for me:

conda update conda
conda update anaconda-navigator
conda install pyside2
0

Try this :

conda update conda
conda update anaconda-navigator

And finally:

pip install PyQt5

It worked for me fine

1
  • Hello harshit! Could you please format your code properly?
    – BiOS
    Feb 28, 2021 at 9:33
0

Make sure that the path in system environment variables point to the right folder as shown in image.

C:\Anaconda3\Scripts,
C:\Anaconda3

enter image description here

0

I was working on a project which used the GPU instead of CPU. I did some Googling and found out that the best way to do this is by using the Anaconda. As you can see I ended up here due to errors I faced. All the answers in this tread is insightful but the recent working answer that has worked for me is a combination previous answers. I'll try to sum up one simple answer and step that can be followed for developers like me to solve this issue.

  1. Change the path in system settings> advanced system settings > Environment Variables> System variables > path > edit > add "C:ProgramData\Anaconda3\Scripts"

  2. Make sure the python is 3.4+

  3. Open CMD in admin mode, change directory to the anaconda then type conda update conda if there is SSL error type conda config --set ssl_verify no or conda config --set ssl_verify false

  4. Then type conda update anaconda-navigator

  5. Then to avoid HTTP and SSL error. Copy the following files:

libcrypto-1_1-x64.* (.dll and .pdb files) libssl-1_1-x64.* (.dll and .pdb files)

From C:ProgramData\Anaconda3\Library\bin to C:ProgramData\Anaconda3\DLLs.

  1. Now open Anaconda prompt(Anaconda3) type(one by one)

    pip install PySide2 pip uninstall pyqt pip uninstall PyQt5

6.Then while in Anaconda3 type pip install pyqt test if you can open anaconda-navigator in anaconda prompt. (if it works you're almost there)

  1. Close everything, Fire up the CMD in Admin mode and type pip install PyQt5.

  2. Open anaconda-navigator in CMD. if It is not working properly, repeat the process after step 4.

I'm not a very pro coder. but this is the process that worked for me! Good luck!!

0

Tried all of the other answers, but didn't work for me. What worked for me was this sequence:

pip uninstall pyside2
conda uninstall qt
conda update conda
conda install anaconda-navigator

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.