Search code examples
python-2.7scipypybrain

Python 2.7.9 PyBrain issue with SciPy


I just tried installing SciPy using scipy‑0.15.1‑cp27‑none‑win_amd64.whl
I have Python 2.7.9 x64 installed
I have wheel installed
I have numpy installed
I am working under Windows7

The log said that scipy has been successfully installed after running:

pip install scipy-0.15.1-cp27-none-win_amd64.whl

The log said that pybrain has been installed succeffully as well:

pip install pybrain

When I create a python file I can import scipy, but when I try to import pybrain I get:

Traceback (most recent call last): File "C:\Users\me\Desktop\PROJECT\nn.py", line 1, in import pybrain File "C:\Python27\lib\site-packages\pybrain__init__.py", line 1, in from structure.init import * File "C:\Python27\lib\site-packages\pybrain\structure__init__.py", line 2, in from modules.init import * File "C:\Python27\lib\site-packages\pybrain\structure\modules__init__.py", line 2, in from gate import GateLayer, DoubleGateLayer, MultiplicationLayer, SwitchLayer File "C:\Python27\lib\site-packages\pybrain\structure\modules\gate.py", line 11, in from pybrain.tools.functions import sigmoid, sigmoidPrime File "C:\Python27\lib\site-packages\pybrain\tools\functions.py", line 4, in from scipy.linalg import inv, det, svd File "C:\Python27\lib\site-packages\scipy\linalg__init__.py", line 161, in from .misc import * File "C:\Python27\lib\site-packages\scipy\linalg\misc.py", line 5, in from . import blas File "C:\Python27\lib\site-packages\scipy\linalg\blas.py", line 155, in from scipy.linalg import _fblas ImportError: DLL load failed: The specified module could not be found.

trying to

import from scipy.linalg import _fblas

only gives the same error:

Traceback (most recent call last): File "C:\Users\me\Desktop\PROJECT\nn.py", line 1, in from scipy.linalg import _fblas File "C:\Python27\lib\site-packages\scipy\linalg__init__.py", line 161, in from .misc import * File "C:\Python27\lib\site-packages\scipy\linalg\misc.py", line 5, in from . import blas File "C:\Python27\lib\site-packages\scipy\linalg\blas.py", line 155, in from scipy.linalg import _fblas ImportError: DLL load failed: The specified module could not be found.

I reached a conclusion I am missing LAPACK so i build it using this link The build finished and all tests passed, but the issue is still there... maybe i did not copy the LIB and BIN to the right destination...


Solution

  • Uninstall and reinstall.

    If you didn't install with sudo the first time, that may be the problem if you're installing for your global Python modules.

    You can also try using installs from here:

    http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy-stack