I am using Python 2.7 and trying to get PyBrain to work.
But I get this error even though scipy is installed -
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/PyBrain-0.3.1-
py2.7.egg/pybrain/__init__.py", line 1, in <module>
from pybrain.structure.__init__ import *
File "/usr/local/lib/python2.7/site-packages/PyBrain-0.3.1-py2.7.egg/pybrain/structure/__init__.py", line 1, in <module>
from pybrain.structure.connections.__init__ import *
File "/usr/local/lib/python2.7/site-packages/PyBrain-0.3.1-py2.7.egg/pybrain/structure/connections/__init__.py", line 1, in <module>
from pybrain.structure.connections.full import FullConnection
File "/usr/local/lib/python2.7/site-packages/PyBrain-0.3.1-py2.7.egg/pybrain/structure/connections/full.py", line 3, in <module>
from scipy import reshape, dot, outer
ImportError: No module named scipy
I have installed scipy using this command -
sudo apt-get install python-scipy
I get -
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-scipy is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
What should I do?
Try to install it as a python package using pip. You said you already tried:
Now run:
I ran both and it worked on my Debian-based box.
To ensure easy and correct installation for python use pip from the get go
To install pip:
To install scipy using pip:
Try to install it as a python package using pip as follows
If you want to run a python 3.x script, install scipy by:
if you are using pycharm go to settings and in project interpreter sub-tab click on "+" sign next to list and in the search bar in there search name "scipy" and install the package.
This may be too basic (and perhaps assumable), but -
Fedora users can use:
sudo dnf install python-scipy
and then (For python3.x):
pip3 install scipy
or (For python2.7):
pip2 install scipy
I recommend you to remove scipy via
and then to install it by
If you do both then you might confuse you deb package manager due to possibly differing versions.