Trouble installing spyder3 on Xubuntu 14.04

281 views
Skip to first unread message

Tom Harrop

unread,
Aug 6, 2015, 11:20:20 AM8/6/15
to spyder
Hello,

I'm trying to run spyder with python3 on Xubuntu 14.04.

I am on Python 3.4.3 and I have PyQt4 installed:

which python3
/usr/bin/python3
python3
Python 3.4.3 (default, Aug  5 2015, 16:15:39)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt4
>>>

I have PyQt4 4.10.4 from apt-get

apt-cache policy python3-pyqt4
python3
-pyqt4:
 
Installed: 4.10.4+dfsg-1ubuntu1
 
Candidate: 4.10.4+dfsg-1ubuntu1

And I installed spyder with pip3

pip3 search spyder
spyder                    
- Scientific PYthon Development EnviRonment
  INSTALLED
: 2.3.5.2 (latest)

However trying to launch spyder gives me an error:

spyder3
Traceback (most recent call last):
 
File "/usr/lib/python3.4/site-packages/spyderlib/qt/__init__.py", line 46, in <module>
   
from PySide import __version__  # analysis:ignore
ImportError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 
File "/usr/lib/python3.4/site-packages/spyderlib/requirements.py", line 40, in check_qt
   
from spyderlib import qt
 
File "/usr/lib/python3.4/site-packages/spyderlib/qt/__init__.py", line 48, in <module>
   
raise ImportError("Spyder requires PySide or PyQt to be installed")
ImportError: Spyder requires PySide or PyQt to be installed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 
File "/usr/local/bin/spyder3", line 3, in <module>
    start_app
.main()
 
File "/usr/lib/python3.4/site-packages/spyderlib/start_app.py", line 114, in main
   
from spyderlib import spyder
 
File "/usr/lib/python3.4/site-packages/spyderlib/spyder.py", line 77, in <module>
    requirements
.check_qt()
 
File "/usr/lib/python3.4/site-packages/spyderlib/requirements.py", line 50, in check_qt
   
% (qt_infos['pyqt']+qt_infos['pyside']))
 
File "/usr/lib/python3.4/site-packages/spyderlib/requirements.py", line 25, in show_warning
   
raise RuntimeError(message)
RuntimeError: Please check Spyder installation requirements:
PyQt4 4.6+ (or PySide 1.2.0+) is required.

I'm starting to wonder if I have a problem with my python3 installation. I'd appreciate any troubleshooting suggestions!

Thanks for reading,

Tom

Adrian Klaver

unread,
Aug 6, 2015, 12:33:07 PM8/6/15
to spyd...@googlegroups.com
On 08/06/2015 02:03 AM, Tom Harrop wrote:
> Hello,
>
> I'm trying to run spyder with python3 on Xubuntu 14.04.
>
> I am on Python 3.4.3 and I have PyQt4 installed:
>
> |
> which python3
> /usr/bin/python3
> python3
> Python3.4.3(default,Aug52015,16:15:39)
> [GCC 4.8.4]on linux
> Type"help","copyright","credits"or"license"formore information.
>>>>importPyQt4
>>>>

So what happens if you do?:

from PyQt4.QtCore import PYQT_VERSION_STR as __version__

> |
>
> I have PyQt4 4.10.4 from apt-get
>
> |
> apt-cache policy python3-pyqt4
> python3-pyqt4:
> Installed:4.10.4+dfsg-1ubuntu1
> Candidate:4.10.4+dfsg-1ubuntu1
> |
>

My guess is that since you are using XUbuntu and therefore xfce you do
not have a system QT install or a minimal one at best. I would crank up
the XUbuntu package manager and see what QT(non-Python) libraries are
installed.


> However trying to launch spyder gives me an error:
>
> |
> spyder3
> Traceback(most recent call last):
> File"/usr/lib/python3.4/site-packages/spyderlib/qt/__init__.py",line
> 46,in<module>
> fromPySideimport__version__ # analysis:ignore
> ImportError:Nomodulenamed 'PySide'
>
> Duringhandling of the above exception,another exception occurred:
>
> Traceback(most recent call last):
> File"/usr/lib/python3.4/site-packages/spyderlib/requirements.py",line
> 40,incheck_qt
> fromspyderlib importqt
> File"/usr/lib/python3.4/site-packages/spyderlib/qt/__init__.py",line
> 48,in<module>
> raiseImportError("Spyder requires PySide or PyQt to be installed")
> ImportError:Spyderrequires PySideorPyQtto be installed
>
> Duringhandling of the above exception,another exception occurred:
>
> Traceback(most recent call last):
> File"/usr/local/bin/spyder3",line 3,in<module>
> start_app.main()
> File"/usr/lib/python3.4/site-packages/spyderlib/start_app.py",line
> 114,inmain
> fromspyderlib importspyder
> File"/usr/lib/python3.4/site-packages/spyderlib/spyder.py",line
> 77,in<module>
> requirements.check_qt()
> File"/usr/lib/python3.4/site-packages/spyderlib/requirements.py",line
> 50,incheck_qt
> %(qt_infos['pyqt']+qt_infos['pyside']))
> File"/usr/lib/python3.4/site-packages/spyderlib/requirements.py",line
> 25,inshow_warning
> raiseRuntimeError(message)
> RuntimeError:Pleasecheck Spyderinstallation requirements:
> PyQt44.6+(orPySide1.2.0+)isrequired.
> |
>
> I'm starting to wonder if I have a problem with my python3 installation.
> I'd appreciate any troubleshooting suggestions!

Pretty sure this is not a Python problem, but a system library issue.
>
> Thanks for reading,
>
> Tom
>



--
Adrian Klaver
adrian...@aklaver.com

Tom Harrop

unread,
Aug 7, 2015, 10:48:01 AM8/7/15
to spyder
Fixed by downloading and installing SIP4 from source: http://pyqt.sourceforge.net/Docs/sip4/installation.html

Thanks for the help

Tom Harrop

unread,
Aug 7, 2015, 10:48:01 AM8/7/15
to spyder
Hi Adrian,

Thanks for taking the time to reply.


So what happens if you do?:

from PyQt4.QtCore import PYQT_VERSION_STR as __version__

Python 3.4.3 (default, Aug  5 2015, 16:15:39)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt4.QtCore import PYQT_VERSION_STR as __version__
Traceback (most recent call last):

 
File "<stdin>", line 1, in <module>
ImportError: No module named 'sip'

But

apt-cache policy python3-sip
python3
-sip:
 
Installed: 4.15.5-1build1
 
Candidate: 4.15.5-1build1

Don't really get it, it seems to me like python3 is not finding my libraries.

My guess is that since you are using XUbuntu and therefore xfce you do
not have a system QT install or a minimal one at best. I would crank up
the XUbuntu package manager and see what QT(non-Python) libraries are
installed.

I opened synaptic and searched for qt4, aside from python-qt4 I see qt4-dev-tools and a couple of other packages. Not really sure what I'm looking for though (or if I'm looking in the right place, I never use the gui package manager).

Thanks again for the help,

Tom

Adrian Klaver

unread,
Aug 7, 2015, 11:05:18 AM8/7/15
to spyd...@googlegroups.com
On 08/07/2015 05:11 AM, Tom Harrop wrote:
> Fixed by downloading and installing SIP4 from source:
> http://pyqt.sourceforge.net/Docs/sip4/installation.html

FYI you could do:

apt-get install python-sip

or

python-sip-dev

>
> Thanks for the help
>
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to spyderlib+...@googlegroups.com
> <mailto:spyderlib+...@googlegroups.com>.
> To post to this group, send email to spyd...@googlegroups.com
> <mailto:spyd...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/spyderlib.
> For more options, visit https://groups.google.com/d/optout.


--
Adrian Klaver
adrian...@aklaver.com

Tom Harrop

unread,
Aug 7, 2015, 6:19:07 PM8/7/15
to spyder
Thanks, I already had those two (and python3-sip) installed but it wasn't working. I had to install from source.
Reply all
Reply to author
Forward
0 new messages