How do I install pybrain?
I downloaded pybrain using git
$ git clone git://github.com/pybrain/pybrain.git
and when i tried to install,
$ python setup.py install
this threw an error while 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 other modules, but I came across almost the same problem. Can you explain how I can solve this?
source to share
Since you downloaded it, you can also use pip to install the install
pip install -e /local/path/to/pybrain
This way pip can install dependencies for you.
Some systems have very old pips / setuptools, so you may need
pip install --upgrade pip
pip install --upgrade setuptools
if the first one fails (I've seen it happen on some systems) try
python -m pip install --upgrade pip
(you will need write permissions to the required installation paths).
edit: it turns out this is not trivial to install ... I tried the following sequence
pip install numpy
pip install scipy
pip install pybrain
in the new virtualenv on Ubuntu 12.04 LTS and scipy complained about the missing BLAS environment variable ... I know BLAS is a library for statistics or math, but not much more.
Reading at http://www.scipy.org/install.html it seems like apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
scipy can be installed (if you are on the correct Ubuntu versions that I am not ..)
source to share
You can download this script: ez_setup.py
and run in a shell $ python ez_setup.py
also you can use the tool easy_install
:
$ easy_install scipy