安装nolearn(python机器学习)结果报错

Installing nolearn (python machine learning) results in error

我正在尝试安装 nolearn,一个 python 机器学习库(基于 theano 和 lasagne),但收到异常错误(注意:该命令是安装 nolearn 的第一步,如安装文档所示):

命令:

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

输出:

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

我尝试了很多方法,包括安装 freetype 以及重新安装 matplotlib(均基于另一个 stackexchange 帖子),但不幸的是它仍然不起作用(显示了上面的错误)。

感谢任何帮助!

我的配置如下:

使用 Anaconda 时,通常 install/update 使用 conda 而不是使用 pip

您可以尝试使用 conda 而不是 pip 更新 scipy:condu update scipy.

或更新通过 conda 安装的所有内容:conda update --all

您可能需要先更新 Anaconda 本身:conda update conda.

如果您可以通过这种方式获得 scipy installed/updated,则对 requirements.txt 中的其他条目进行相同的尝试(运行 install/update manually/individually).

我最终难以协调 nolearn 库及其对 lasagnetheano(等)recent/current 版本的要求以及可用/兼容的版本anaconda。如果有更多时间,我可能已经能够解决这些冲突,但由于时间有限,我只是停止使用 anaconda(和 conda),只使用常规 python 分布和 virtualenv(和 virtualenvwrapper),很快就可以正常工作了。