分类: LINUX
2017-02-05 13:39:40
操作系统: ~$ cat /proc/version
Linux version 4.4.0-53-generic (buildd@lgw01-18) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #74~14.04.1-Ubuntu SMP Fri Dec 2 03:43:31 UTC 2016
python: python
Python 2.7.6 (default, Oct ***)
[GCC 4.8.4] on linux2
~# sudo apt-get install python-dev python-numpy python-numpy-dev python-setuptools python-numpy-dev python-scipy libatlas-dev g++
~# sudo apt-get install python-matplotlib
安装完成后,测试以上的库安装是否成功,使用如下代码:
点击(此处)折叠或打开
~# pip install -U scikit-learn
使用python交互环境测试安装成功与否(没有出现报错,表示安装成功; 若报错,则需要从新安装):
~# python
Python 2.7.6 (default, Oct ***)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
>>> quit()
~# sudo easy_install nose
使用测试如下代码进行测试:
import nose
result = nose.run
print result()
返回True或False,意味着安装完成.
建议安装方式为源码安装,所以我们到github下载源码: ~/crab-master$ sudo python setup.py install
使用python进行测试,显示如下表示成功.
~/crab-master$ python -c "import scikits.crab as scc; scc.test()"
Running unit tests and doctests for scikits.crab
NumPy version 1.8.2
NumPy is installed in /usr/lib/python2.7/dist-packages/numpy
Python version 2.7.6 (default, Oct ***) [GCC 4.8.4]
nose version 1.3.7
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK