fisadev/world_cup_learning

Issue with IPython

Opened this issue · 3 comments

Hi Fisadev,
I get the following issue, not sure if it is an IPython issue or not.

Here is the traceback - it happens on the first cell of the IPython notebook

ImportError Traceback (most recent call last)
in ()
4 import pygal
5
----> 6 from pybrain.structure import FeedForwardNetwork, LinearLayer, SigmoidLayer, FullConnection
7 from pybrain.tools.shortcuts import buildNetwork
8 from pybrain.supervised.trainers import BackpropTrainer

/home/peadar/.virtualenvs/world_cup/src/pybrain/pybrain/init.py in ()
----> 1 from pybrain.structure.init import *

/home/peadar/.virtualenvs/world_cup/src/pybrain/pybrain/structure/init.py in ()
----> 1 from pybrain.structure.connections.init import *
2 from pybrain.structure.modules.init import *
3 from pybrain.structure.networks.init import *
4 from pybrain.structure.modulemesh import ModuleMesh

/home/peadar/.virtualenvs/world_cup/src/pybrain/pybrain/structure/connections/init.py in ()
----> 1 from pybrain.structure.connections.full import FullConnection
2 from pybrain.structure.connections.identity import IdentityConnection
3 from pybrain.structure.connections.shared import SharedFullConnection, MotherConnection, SharedConnection
4 from pybrain.structure.connections.linear import LinearConnection
5 from pybrain.structure.connections.fullnotself import FullNotSelfConnection

/home/peadar/.virtualenvs/world_cup/src/pybrain/pybrain/structure/connections/full.py in ()
1 author = 'Tom Schaul, tom@idsia.ch'
2
----> 3 from scipy import reshape, dot, outer
4
5 from pybrain.structure.connections.connection import Connection

/home/peadar/.virtualenvs/world_cup/lib/python2.7/site-packages/scipy/init.py in ()
68 all = ['test']
69
---> 70 from numpy import show_config as show_numpy_config
71 if show_numpy_config is None:
72 raise ImportError("Cannot import scipy when running from numpy source directory.")

/home/peadar/.virtualenvs/world_cup/lib/python2.7/site-packages/numpy/init.py in ()
151 return loader(_packages, *_options)
152
--> 153 from . import add_newdocs
154 all = ['add_newdocs', 'ModuleDeprecationWarning']
155

/home/peadar/.virtualenvs/world_cup/lib/python2.7/site-packages/numpy/add_newdocs.py in ()
11 from future import division, absolute_import, print_function
12
---> 13 from numpy.lib import add_newdoc
14
15 ###############################################################################

/home/peadar/.virtualenvs/world_cup/lib/python2.7/site-packages/numpy/lib/init.py in ()
15 from .ufunclike import *
16
---> 17 from . import scimath as emath
18 from .polynomial import *
19 #import convertcode

ImportError: cannot import name scimath

I am trying to improve your requirements.txt file inside a virtual environment

pip freeze gives the following.

Jinja2==2.7.2
Markdown==2.4
MarkupSafe==0.23
MySQL-python==1.2.5
-e git+https://github.com/pybrain/pybrain.git@1dd5086a51c3c98497ef85b31178588a89d8951e#egg=PyBrain-master
PyYAML==3.11
Pygments==1.6
SQLAlchemy==0.9.4
Sphinx==1.2.2
StarCluster==0.95.5
Werkzeug==0.9.4
argparse==1.2.1
backports.ssl-match-hostname==3.4.0.2
boto==2.29.1
brewer2mpl==1.4
colorama==0.2.5
csvkit==0.7.3
dbf==0.94.003
decorator==3.4.0
dill==0.2b1
docutils==0.11
ecdsa==0.11
gevent==1.0
gevent-websocket==0.9.3
greenlet==0.4.2
httplib2==0.9
ipdb==0.8
iptools==0.6.1
ipython==2.0.0
iso8601==0.1.10
itsdangerous==0.24
jdcal==1.0
lxml==3.3.5
matplotlib==1.3.1
mock==1.0.1
mpld3==0.1
nose==1.3.3
numpy==1.8.1
numpydoc==0.4
openpyxl==1.8.0
optcomplete==1.2-devel
pandas==0.14.0
paramiko==1.14.0
progressbar==2.2
psycopg2==2.5.3
pycrypto==2.6.1
pygal==1.4.6
pyparsing==2.0.2
python-dateutil==2.2
python-gflags==2.0
pytz==2014.4
pyzmq==14.3.0
scikit-learn==0.14.1
scimath==4.1.2
scipy==0.14.0
scp==0.8.0
six==1.7.2
tornado==3.2.2
traits==4.5.0
websocket==0.2.1
websocket-client==0.12.0
workerpool==0.9.2
wsgiref==0.1.2
xlrd==0.9.3

Yet it works if I install pybrain manually using.
git clone git://github.com/pybrain/pybrain.git
and python setup.py install

How did you install scipy, numpy and pandas?

Also, I've just updated the requirements, now they install everything needed (also removed old unneded dependencies), and the README with some extra installation instructions. Can you try with them (in a clean new virtualenv)?