1

I am attempting to install nolearn, a python machine learning library (based upon theano and lasagne), and am receiving an unusual error (note: the command is the first step in installing nolearn as install docs):

COMMAND:

sudo pip install -r https://raw.githubusercontent.com/dnouri/nolearn/master/requirements.txt

OUTPUT:

Command "{user-directory}/miniconda3/envs/condatest/bin/python3 -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-_ox1_tc0/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ms2zduwl-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-_ox1_tc0/scipy

I have tried a number of things, including installing freetype as well as reinstalling matplotlib (both based upon another stackexchange posting) but unfortunately it still does not work (error above is shown).

Any assistance is appreciated!

My configuration is as follows:

  • running on MAC OSX (Yosemite)
  • running in ANACONDA environment
  • using conda as environment manager
Eric Broda
  • 6,701
  • 6
  • 48
  • 72
  • Scipy failed to update for some reason. Please rerun adding to `pip` the `--log` [option](http://pip.readthedocs.org/en/stable/reference/pip/#file-logging) probably it'll shed some light on the issue. – memoselyk Nov 06 '15 at 00:27

2 Answers2

1

When using Anaconda it is generally better to install/update using conda instead of using pip.

You could try updating scipy using conda instead of pip: condu update scipy.

Or update everything installed via conda: conda update --all.

You may need to update Anaconda itself first: conda update conda.

If you can get scipy installed/updated that way, then try the same for the other entries in requirements.txt (running the install/update manually/individually).

Daniel Renshaw
  • 33,729
  • 8
  • 75
  • 94
  • Thanks for the ideas -- I suspect the issue identifying scipy as the component that was not installed is a symptom rather that the root cause. Specifically, I was able to install scipi successfully with conda, but the actual library I want, `nolearn`, only has a very old version. – Eric Broda Nov 07 '15 at 01:02
  • Having now successfully installed scipy, I am now getting an error related to lasagne: `Command "{user-directory}/miniconda3/envs/condatest/bin/python3 -c "import setuptools, tokenize; __file__='/Users/ericbroda/MachineLearning/digits/src/lasagne/setup.py'; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps" failed with error code 1 in /Users/ericbroda/MachineLearning/digits/src/lasagne` – Eric Broda Nov 07 '15 at 01:03
  • One last comment... I am using python 3.5 the version of lasagne available via conda does not support this version of python (conda issues package conflicts errors) – Eric Broda Nov 07 '15 at 01:06
  • You can get the most recent version of Lasagne from Github. You don't have to use `pip` or `conda` to install it. Just follow the "development installation" instructions at http://lasagne.readthedocs.org/en/latest/user/installation.html#development-installation – Daniel Renshaw Nov 07 '15 at 05:51
  • Thanks Daniel. That is what I will be doing. I ended up needing to stop using conda and switch to virtualenv (and virtualenvwrapper) and it seemed to be much easier to get nolearn working properly. – Eric Broda Nov 07 '15 at 18:03
0

I ended up having difficulty reconciling the nolearn library and its requirements for recent/current versions of lasagne and theano (etc) and the versions available / compatible with anaconda. I may have been able to resolve these conflicts given more time, but being time constrained, I just stopped using anaconda (and conda) and just used the regular python distribution and virtualenv (and virtualenvwrapper) and got it all working very quickly.

Eric Broda
  • 6,701
  • 6
  • 48
  • 72