Ubuntu-Python2.7安装 scipy,numpy,matplotlib 和pip
一、 scipy,numpy,matplotlib
sudo apt-get install python-scipy
sudo apt-get install python-numpy
sudo apt-get install python-matplotlib
python
import scipy
import numpy
import pylab
scipy.test()
numpy.test()
pylab.test()
二、pip
1、先说一下什么是pip
pip 是“A tool for installing and managing Python packages.”,也就是说pip是python的软件安装工具
2、下面介绍怎么在linux下安装pip
下载pip到/usr/local/src
# cd /usr/local/src
# wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" --no-check-certificate
如果提示:-bash: wget: command not found
那么安装wget,执行如下:
# yum -y install wget 解夺安装pip
# tar -xzvf pip-1.5.4.tar.gz
# cd pip-1.5.4
# python setup.py install
如果安装报下面的错:
Traceback (most recent call last):
File "setup.py", line 6, in <module>
from setuptools import setup, find_packages
ImportError: No module named setuptools 那么就要先安装setuptools包
(1)下载setuptools包
# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-2.0.tar.gz
(2)解压setuptools包
# tar zxvf setuptools-2.0.tar.gz
# cd setuptools-2.0
(3)编译setuptools
# python setup.py build
(4)开始执行setuptools安装
# python setup.py install 安装完成setuptools包后,在重新执行:
# cd /usr/local/src/pip-1.5.4
# python setup.py install
至此pip安装完成 3、linux下pip使用参数
# pip --help Usage:
pip <command> [options] Commands:
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
search Search PyPI for packages.
wheel Build wheels from your requirements.
zip DEPRECATED. Zip individual packages.
unzip DEPRECATED. Unzip individual packages.
bundle DEPRECATED. Create pybundles.
help Show help for commands. General Options:
-h, --help Show help.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output.
--log-file <path> Path to a verbose non-appending log, that only logs failures. This log is active by default at /root/.pip/pip.log.
--log <path> Path to a verbose appending log. This log is inactive by default.
--proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.
--cert <path> Path to alternate CA bundle.
Ubuntu-Python2.7安装 scipy,numpy,matplotlib 和pip的更多相关文章
- Ubuntu-Python2.7安装 scipy,numpy,matplotlib
sudo apt-get install python-scipy sudo apt-get install python-numpy sudo apt-get install python-matp ...
- Ubuntu-Python2.7安装 scipy,numpy,matplotlib (转)
sudo apt-get install python-scipy sudo apt-get install python-numpy sudo apt-get install python-matp ...
- python2.7 安装 Scipy
Numpy.scikit-learn可以直接 pip install xxx 但Scipy不能,在官网找到了安装方法: python -m pip install --user numpy scipy ...
- 安装 SciPy 和 scikit-learn 升级pip 及pip基本命令表
安装Scipy和scikit-learn出错,出错记录及当时最终解决办法 问题: 一.使用pip直接安装 直接pip install scipy C:\Users\Plain>pip insta ...
- win7 + python2.7 安装scipy
问题: 直接pip install scipy将不能正确安装,缺少文件 方法: 下载 "scipy‑0.19.0‑cp27‑cp27m‑win_amd64.whl"[90多M] ...
- ubuntu Python2.7 安装PIL问题
$sudo easy_install PIL WARNING: '' not a valid package name; please use only.-separated package name ...
- Numpy、SciPy、MatPlotLib在Python2.7.9下的安装与配置
前言: Python安装完Numpy,SciPy和MatplotLib后,可以成为非常犀利的科研利器.网上关于这三个库的安装都写得非常不错,但是大部分人遇到的问题并不是如何安装,而是安装好后因为配置不 ...
- windows下python2.7版本numpy,Scipy,matplotlib,sklearn安装
系统是windows32位,安装了python2.7.13. 安装顺序就是numpy,Scipy,matplotlib,sklearn. 首先是更新一下pip (确保pip能使用) 然后将setupt ...
- Windows系统在Python2.7环境下安装numpy, matplotlib, scipy - Lichanghao Blog
numpy, matplotlib, scipy三个包是科学计算和绘图的利器.安装它们既可以在网上下载exe安装包,也可以用python内置的包管理工具来下载安装,后者较为方便. 这几天做美赛要用到, ...
随机推荐
- Python学习笔记020——数据库中的数据类型
1 数值类型 数值类型分为有符号signed和无符号unsigned两种. 1.1 整型 int (1)bigint 极大整型(8个字节) 范围 :-2**64 ~ 2**64 - 1 -922337 ...
- python学习笔记013——内置函数dir()
1 描述 dir() 函数 不带参数时,返回当前范围内的变量.方法和定义的类型列表: 带参数时,返回参数的属性.方法列表. 如果参数包含方法__dir__(),该方法将被调用. 如果参数不包含__di ...
- TCP客户/服务器简单Socket程序
建立一个 TCP 连接时会发生下述情形: 1. 服务器必须准备好接受外来的连接.这通常通过调用 socket.bind 和 listen 这三个函数来完成,我们称之为被动打开. 2. 客户通过调用 c ...
- Cocos2d-X开发中国象棋《二》project文件概述
我在上一篇博客中介绍了象棋的功能.在接下来的博客中将向大家介绍使用Cocos2d-X怎样一步一步开发中国象棋 开发工具: Cocos2d-X2.2.3 VS2012 项目的文件夹: Classes:存 ...
- eclipse3.7之后,在引入的jquery的js文件打红叉
使用Eclipse 3.7时,工程中加入jquery.xx.js文件,发现该文件出现错误提示(红×),但使用Eclipse 3.7以前的版本就不会出现这种提示.是因为Eclipse 3.7在.proj ...
- 使用配置hadoop中常用的Linux(ubuntu)命令
生成key: $ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa $ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized ...
- 《Effective Java》读书笔记五(枚举和注解)
No30 用enum代替int常量 一:综述 int枚举模式,示范: // The int enum pattern - severely deficient! public static final ...
- Oracle学习笔记之六(DDL:表、索引、视图、同义词、序列操作相关SQL)
下面这些基本的SQL语句应该熟悉,能够灵活运用.最好在不查资料的情况下,能够写出如下的任何代码. 1. 数据表操作相关 --创建表 create table STUDENTS( STUNO ) not ...
- cscope使用技巧
1.执着cscope.files文件,对源码目前全文件搜索 find `pwd` -type f > cscope.files `pwd`生成当前目录的绝对路径,这样在cs命令里面就可以不用写那 ...
- Mac中提升权限修改系统目录
原来OSX EI Capitan中增加了一个SIP功能,不管你是不是su,都会阻止你在系统目录下进行操作.如果,想要修改系统目录的文件,如升级bash,需要修改/bin/bash,那么就要先关闭SIP ...