Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

OpenSeasame in Anaconda: cannot import name Qsci


I am running Ubuntu 17.04 and just installed Anaconda, and then OpenSesame under Anaconda.
When trying to run OpenSesame, I get the following Python error:

Traceback (most recent call last):
File "/home/luke/anaconda2/bin/opensesame", line 25, in
File "/home/luke/.local/lib/python2.7/site-packages/libqtopensesame/", line 80, in opensesame
File "/home/luke/.local/lib/python2.7/site-packages/libqtopensesame/", line 105, in resume_init
from QProgEdit import validate
File "/home/luke/.local/lib/python2.7/site-packages/QProgEdit/", line 69, in
from QProgEdit._quiloader import QUiLoader
File "/home/luke/.local/lib/python2.7/site-packages/QProgEdit/", line 23, in
from QProgEdit.pyqt5compat import uic
File "/home/luke/.local/lib/python2.7/site-packages/QProgEdit/", line 22, in
from PyQt5 import Qsci
ImportError: cannot import name Qsci

I'm not sure why it's trying to look for a whole bunch of packages outside of /home/luke/anaconda2/bin, even though it's already in my PATH variable. Would anyone know how to fix these path problems?



  • Hi Luke,
    We are having problems composing the qt5 dependencies for OpenSesame on Anaconda. Continuum (the maintainers of Anaconda) are having a hard time maintaining qt5 because Riverbank (the maintainers of Qt5) have dropped support for the compiler Continuum used to build all the Anaconda packages with (see here for a post I did concerning this on their forum). Therefore, the Qt5 version is stuck at 5.6.2 on Anaconda until Continuum figures out their next steps.

    There are however a few easy solutions around this:

    • Riverbank does provide wheels (a sort of package container for python) for PyQt5 and QScintilla2 on pip. You should thus be able to simply install the newest PyQt5 and QScintilla2 dependencies with:
    pip install PyQt5 QScintilla

    although I am not sure there wheels for Linux too.

    • You could always still use the standard Ubuntu repositories for installing the packages you miss, although I don't know how well that will play together with Anaconda. I don't really remember the precise command, but you could try installing qscintilla2 with
    sudo apt install python-qscintilla2

    Maybe @smathot is of better help to you here, because he is an avid Ubuntu user too.

  • Hi Luke,

    To me it looks like Anaconda is picking up libraries that you have installed previously with the pip that belongs to Ubuntu's default Python environment. You would think that Anaconda ignores those, so this is a bit strange. Have you explicitly set your PYTHON_PATH to include /home/luke/.local/lib/python2.7/site-packages/ or something?


  • Hi Sebastiaan,

    When I do echo $PYTHON_PATH, I don't actually get anything, but when I do echo $PATH, I get this:


    My ~/.profile file has this line at the end:

    export PATH=$HOME/anaconda2/bin:$PATH
  • I think that Python looks in .local/lib/python2.7/site-packages/ by default, even if it's not in the Python path. That would be strange in the case of Anaconda, because it means that Anaconda is not cleanly separated from your regular Python distribution—which is kind of the point.

    What do you get if you run python (the Anaconda one) and enter the code below?

    import site

    PS. The regular PATH variable is for locating executables. That doesn't have anything to do with Python.

  • When I load up python, I get this output:

    Python 2.7.13 |Anaconda 4.3.1 (64-bit)| (default, Dec 20 2016, 23:09:15) 
    [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    Anaconda is brought to you by Continuum Analytics.
    Please check out: and
    >>> import site
    >>> print (site.getusersitepackages())
Sign In or Register to comment.