ubuntupythonnumpy
㈠ ubuntu怎么安装python的第三方库scikit-learn
1、首先配置基本的python库
sudo apt-get install build-essential python-dev python-numpy python-setuptools python-scipy libatlas-dev libatlas3-base
2、配置matplotlib库,进行画图之类的
sudo apt-get install python-matplotlib
3、配置scikit-learn库
sudo apt-get install python-sklearn
㈡ ubuntu系统怎么安装python版本的opencv
由于ubuntu14.04/16.04都自带了python2.7和python3.5,所以无需在安装python。
检查python是否安装:
~ whereis python
首先需要的是 pip:
~ sudo apt-get install python3-setuptools python3-dev sudo easy_install3 pip
然后是 numpy:
~ pip3 install numpy
安装依赖:
~ sudo apt-get install build-essential sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
安装opencv3:
~ wget https://codeload.github.com/opencv/opencv/zip/3.2.0
~ unzip 3.2.0 && cd 3.2.0
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local PYTHON3_EXECUTABLE=/usr/bin/python3 PYTHON_INCLUDE_DIR=/usr/include/python3.4 PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.4m.so PYTHON3_NUMPY_INCLUDE_DIRS=/usr/local/lib/python3.4/dist-packages/numpy/core/include ..
~ make -j4
~ sudo make install
㈢ ubuntu 16.04 lts python 2.7怎么安装numpy
开始学习python...最近使用ubuntu16.04系统,在安装numpy的步骤:
1 安装python的包管理工具pip,无论是在windows系统还是ubuntu系统,大部分的安装工作都可以交给pip了,太方便!!!
sudo aptinstall python-pip
安装完成后竟然提示我更新新版本,提示如下:
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
按照提示更新就好-->:
pip install --upgrade pip
2用Ppip安装numpy:
pip install numpy
注释:pip3是python3版本的pip工具,安装后运行pip直接会使用已安装的pip版本;也可以用pip --version检查pip版本。
以后就可以使用pip安装各种库了,比如安装matplotlib就这样:
sudo pip install matplotlib
注意要用sudo获得root权限,才能安装成功。