Howdy, Stranger!

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

Supported by

failed to import psycho backend

edited June 12 in OpenSesame

Dear all,

Running experiments with the 'psycho' backend seems difficult on the current computer I am working on, and I was wondering if anyone had experienced something similar. The error that pops up is the following:
"failed to import psychopy because it is not (correctly) installed. For installation instructions, please visit [...] etc"

importing psychopy from the debugger works, but importing individual modules leads to strange errors that look red herring-ish (see end of this post).
The environment variables are the same as for a system where the backend is working correctly

C:\Python27;C:\Python27\DLLs;C:\Python27\Scripts;
C:\Python27\gnuplot\binary;C:\Python27\Lib\site-packages\vtk;
C:\Program Files (x86)\PsychoPy2;
C:\Program Files (x86)\PsychoPy2\DLLs;
C:\Program Files (x86)\pythonxy\SciTE-3.3.2-3;
C:\Program Files (x86)\pythonxy\console;
C:\Python27\Lib\site-packages\PyQt4;

the OS is windows 7, and the errors come from stand-alone opensesame version 3.1.9 and are the same in version 3.0.5, the backend works fine in opensesame 2.8 and 2.9.
any suggestions are welcome,

Roelof


Python 2.7.12

* Type "help()", "copyright()", "credits()" or "license()" for more information.
* Use the "print([msg])" function in inline_script items to print to this debug window.
* Inspect inline_script variables when an experiment is finished.

import psychopy

from psychopy import visual

ImportErrorTraceback (most recent call last)
<ipython-input-2-f798aaf28897> in <module>()
----> 1 from psychopy import visual

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\psychopy\visual\__init__.py in <module>()
     13 
     14 # window, should always be loaded first
---> 15 from psychopy.visual.window import Window, getMsPerFrame, openWindows
     16 
     17 # non-private helpers

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\psychopy\visual\window.py in <module>()
     55 
     56 import psychopy  # so we can get the __path__
---> 57 from psychopy import core, platform_specific, logging, prefs, monitors, event
     58 import psychopy.event
     59 

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\psychopy\monitors\__init__.py in <module>()
      4 
      5 import os, sys
----> 6 import calibTools
      7 from calibTools import *
      8 

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\psychopy\monitors\calibTools.py in <module>()
     18 
     19 import numpy
---> 20 import scipy.optimize as optim
     21 from scipy import interpolate
     22 

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\scipy\optimize\__init__.py in <module>()
    231 
    232 from .optimize import *
--> 233 from ._minimize import *
    234 from ._root import *
    235 from .minpack import *

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\scipy\optimize\_minimize.py in <module>()
     28 
     29 # constrained minimization
---> 30 from .lbfgsb import _minimize_lbfgsb
     31 from .tnc import _minimize_tnc
     32 from .cobyla import _minimize_cobyla

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\scipy\optimize\lbfgsb.py in <module>()
     42                        _check_unknown_options, wrap_function,
     43                        _approx_fprime_helper)
---> 44 from scipy.sparse.linalg import LinearOperator
     45 
     46 __all__ = ['fmin_l_bfgs_b', 'LbfgsInvHessProduct']

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\scipy\sparse\linalg\__init__.py in <module>()
    114 from .interface import *
    115 from .eigen import *
--> 116 from .matfuncs import *
    117 from ._onenormest import *
    118 from ._norm import *

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\scipy\sparse\linalg\matfuncs.py in <module>()
     17 import numpy as np
     18 
---> 19 import scipy.misc
     20 from scipy.linalg.basic import solve, solve_triangular
     21 

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\scipy\misc\__init__.py in <module>()
     49 from .common import *
     50 from numpy import who, source, info as _info
---> 51 from scipy.special import comb, factorial, factorial2, factorialk
     52 
     53 import sys

C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\scipy\special\__init__.py in <module>()
    625 from __future__ import division, print_function, absolute_import
    626 
--> 627 from ._ufuncs import *
    628 
    629 from .basic import *

ImportError: DLL load failed: The specified procedure could not be found.`
![](https://forum.cogsci.nl/uploads/editor/zy/3a1ift2c5mhq.png "")

Comments

  • Hi Roelof,

    The error seems to come from scipy, more specifically the scipy.optimize module. If you import this module on its own, do you get the same error?

    Cheers,
    Sebastiaan

    Thanked by 1Roelof

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • Hi Sebastiaan,

    Thank you for the response and suggestion, importing the module on its own (import scipy) gives no errors, but importing the specific module gives:

    from scipy import optimize
    
    ImportErrorTraceback (most recent call last)
    <ipython-input-2-b32e70e68d77> in <module>()
    ----> 1 from scipy import optimize
    
    C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\scipy\optimize\__init__.py in <module>()
        231 
        232 from .optimize import *
    --> 233 from ._minimize import *
        234 from ._root import *
        235 from .minpack import *
    
    C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\scipy\optimize\_minimize.py in <module>()
         28 
         29 # constrained minimization
    ---> 30 from .lbfgsb import _minimize_lbfgsb
         31 from .tnc import _minimize_tnc
         32 from .cobyla import _minimize_cobyla
    
    C:\Program Files (x86)\_PortableOpenSesameS\opensesame_3.1.9-py2.7-win32-1\lib\site-packages\scipy\optimize\lbfgsb.py in <module>()
         38 import numpy as np
         39 from numpy import array, asarray, float64, int32, zeros
    ---> 40 from . import _lbfgsb
         41 from .optimize import (approx_fprime, MemoizeJac, OptimizeResult,
         42                        _check_unknown_options, wrap_function,
    
    ImportError: cannot import name _lbfgs
    

    This last line (ImportError: cannot import name _lbfgs) also occurs for importing packages from psychopy such as visual or tools,

  • Perhaps also of importance: the error occurs only on a specific desktop, the same standalone opensesame version (ran from usb) works fine on my own laptop

Sign In or Register to comment.