问题:'It seems the kernel died unexpectedly. Use 'Restart kernel' to continue using this console.'
解决:
conda install nomkl numpy scipy scikit-learn numexpr
conda remove mkl mkl-service
Anaconda 提供一个管理工具 conda
,可以把 conda
看作是 pip
+ virtualenv
+PVM (Python Version Manager)
+ 一些必要的底层库,也就是一个更完整也更大的集成管理工具。
We are happy to announce that Anaconda 2.5 has been released, which includes the Intel Math Kernel Library (MKL) optimizations (version 11.3.1) for improved performance. While we have supported MKL-enabled versions of numpy
, scipy
,scikit-learn
and numexpr
for several years as our commercial "MKL Optimizations" product, we are now making these packages available for free for everyone, and they are included by default in the standard Anaconda installers. This means that you do not have to do anything extra to see the performance benefits of MKL when using these packages! All you need to do is download and install Anaconda 2.5 (or higher), and you're ready to go. If you already have Anaconda installed, update to Anaconda 2.5 by using conda:
conda update conda
conda install anaconda=2.5
The list of changes, fixes and updates can be found in thechangelog.
Anaconda now also includes a small utility package called mkl-service
which provides a Python interface to some useful MKL functions declared in mkl_service.h
, such as setting the number of threads to use. For example:
>>> import mkl
>>> mkl.get_max_threads()
2
>>> mkl.set_num_threads(1)
>>> mkl.get_max_threads()
1
The full list of available interface functions is documented on github .
Finally, in case you do not need or want MKL, it is possible to opt out of installing MKL. We provide this option on Linux and OS X, because MKL is a large package (roughly 100MB), and for many tasks it is not necessary. The alternatives to MKL areOpenBLAS (for Linux), and the native Accelerate Framework (for OS X). To use the non-MKL versions of packages on Linux or OS X, first install Miniconda , and then execute:
conda install nomkl
This effectively adds the nomkl
feature, which makes conda prefer non-MKL versions of packages in all cases. For example, executing:
conda install scipy
will install the non-MKL version of scipy
, and also the non-MKL version of numpy
. The installation of non-MKL dependencies happens automatically for any package, even if the requested package itself does not depend on MKL ( pandas
, for example).
If you have already downloaded and installed the full Anaconda, you can (again on Linux and OS X only) remove MKL using the following commands:
conda install nomkl numpy scipy scikit-learn numexpr
conda remove mkl