2

Initially, I installed spyder 3 using sudo pip install spyder and everything worked well.

After that, I was trying to solve the issue of having very small icons in high resolutions screen discussed here.

For that, I installed pyqt4 (since I'm using python 2.7) using sudo apt-get install python-qt4, but the small icons problem wasn't solved because I realized I needed pyqt5.

I then installed it and some dependencies:

python3-pyqt5
python3-pyqt5.qtsvg 

After this step, I couldn't open spyder anymore and got this error message:

Traceback (most recent call last):
  File "/usr/local/bin/spyder", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/spyder/app/start.py", line 143, in main
    from spyder.app import mainwindow
  File "/usr/local/lib/python2.7/dist-packages/spyder/app/mainwindow.py", line 89, in <module>
    from qtpy import QtSvg  # analysis:ignore
  File "/usr/local/lib/python2.7/dist-packages/qtpy/QtSvg.py", line 14, in <module>
    from PyQt5.QtSvg import *
ImportError: No module named QtSvg

I tried uninstalling pyqt5, and also pyqt4 and reinstalling them (one without the other), but nothing seems to work.

I think I have the module QtSvg installed, but it seems spyder is not pointing at it correctly and I don't know how to fix this.

Makondo
  • 343
  • 4
  • 16
  • 1
    If you check the error message, it says that you are using python2, and you have installed that module in python3, so there are 2 solutions: either change the configuration from spyder to python3, or install that module in python2: `python-pyqt5` `python-pyqt5.qtsvg` – eyllanesc Jan 17 '18 at 11:37
  • Oh yes, I figured something like that could be happening. The thing is I'm trying to find a way of installing those modules in python 2 on Ubuntu 16, but no luck yet. – Makondo Jan 17 '18 at 11:45
  • 1
    execute: `sudo apt-get install python-pyqt5 python-pyqt5.qtsvg` – eyllanesc Jan 17 '18 at 11:47
  • Omg. I feel so dumb... My brain completely missed the 3 in python3... Thanks, now it's working again. – Makondo Jan 17 '18 at 11:52

0 Answers0