日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python2.7安装matplotlib_Ubuntu-Python2.7安装 scipy,numpy,matplotlib 和pip

發布時間:2024/8/23 python 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python2.7安装matplotlib_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

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 [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 to a verbose non-appending log, that only logs failures. This log is active by default at /root/.pip/pip.log.

--log Path to a verbose appending log. This log is inactive by default.

--proxy Specify a proxy in the form [user:passwd@]proxy.server:port.

--timeout Set the socket timeout (default 15 seconds).

--exists-action Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.

--cert Path to alternate CA bundle.

原文:http://www.cnblogs.com/awishfullyway/p/5868745.html

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的python2.7安装matplotlib_Ubuntu-Python2.7安装 scipy,numpy,matplotlib 和pip的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。