How to install pybrain?

7.6k views Asked by At

I downloaded pybrain using git

$ git clone git://github.com/pybrain/pybrain.git

and when I tried to install,

$ python setup.py install

it caused error on installing scipy:

Running scipy-0.14.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-fxe0wp/scipy-0.14.0/egg-dist-tmp-Kbnkhx
Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    install_requires = ["scipy"],
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/install.py", line 76, in run
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/install.py", line 104, in do_egg_install
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 211, in run
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 427, in easy_install
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 478, in install_item
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 519, in process_distribution
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 563, in resolve
    entry = dist.location
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 799, in best_match
    def scan(self, search_path=None):
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 811, in obtain
    for dist in find_distributions(item):
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 446, in easy_install
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 476, in install_item
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 655, in install_eggs
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 930, in build_and_install
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 919, in run_setup
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 62, in run_setup
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 105, in run
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 64, in <lambda>
  File "setup.py", line 237, in <module>

  File "setup.py", line 225, in setup_package

ImportError: No module named numpy.distutils.core

I tried to install another modules, but I met the almost same problem. Can you explain how can I solve it?

5

There are 5 answers

1
thebjorn On BEST ANSWER

Since you've downloaded it, you can also use pip to do a development install

pip install -e /local/path/to/pybrain

that way pip might install the dependencies for you.

Some systems have very old pips/setuptools, so you might need to do

pip install --upgrade pip
pip install --upgrade setuptools

if the first one fails (I've seen that happen on some systems), try

python -m pip install --upgrade pip

(you'll need write permissions on the required install paths).

edit: turns out this is not trivial to install... I'm tried the following sequence

pip install numpy
pip install scipy
pip install pybrain

in a fresh virtualenv on Ubuntu 12.04 LTS and scipy complained about a missing BLAS environment variable... I know BLAS is a library for stats or maths, but not much more.

Reading at http://www.scipy.org/install.html it seems that apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose might get scipy installed (if you're on the correct Ubuntu versions -- which I'm not..)

0
oopcode On

I'm not sure, but maybe you should install numpy?

pip install numpy
2
Bobbeh On

I recommend using PIP to install modules Like this:

pip install pybrain

But if you cant use that or choose not you, try using @thebjorn's

Hope this helped,

~Bobbeh

P.S, yea I did forget to hit "Post You Answer"

1
user143796 On

Just install from command line with this command:

`pip install pybrain`
0
AudioBubble On

You can download this script: ez_setup.py

and run in shell $ python ez_setup.py

also you can use easy_install tool:

$ easy_install scipy