python2.7安装pandas_在python2.7安装数据分析包pandas

Installing pandas with

Anaconda¶

Installing pandas and the rest of the

NumPy

and SciPy stack can be a little

difficult for inexperienced users.

The simplest way to install not only pandas, but Python and the

most popular packages that make up the

SciPy

stack (IPython,

NumPy,

Matplotlib, ...) is with

Anaconda, a cross-platform (Linux,

Mac OS X, Windows) Python distribution for data analytics and

scientific computing.

After running a simple installer, the user will have access to

pandas and the rest of the

SciPy

stack without needing to install anything else, and without

needing to wait for any software to be compiled.

Installation instructions for

Anaconda

can be found here.

A full list of the packages available as part of the

Anaconda

distribution can be found

here.

An additional advantage of installing with Anaconda is that you

don’t require admin rights to install it, it will install in the

user’s home directory, and this also makes it trivial to delete

Anaconda at a later date (just delete that folder).

Installing pandas with

Miniconda¶

The previous section outlined how to get pandas installed as

part of the Anaconda

distribution. However this approach means you will install well

over one hundred packages and involves downloading the installer

which is a few hundred megabytes in size.

If you want to have more control on which packages, or have a

limited internet bandwidth, then installing pandas with

Miniconda

may be a better solution.

Conda

is the package manager that the

Anaconda distribution is built

upon. It is a package manager that is both cross-platform and

language agnostic (it can play a similar role to a pip and

virtualenv combination).

Miniconda

allows you to create a minimal self contained Python

installation, and then use the

Conda command to install

additional packages.

First you will need Conda

to be installed and downloading and running the

Miniconda will do this for you.

The installer can be found

here

The next step is to create a new conda environment (these are

analogous to a virtualenv but they also allow you to specify

precisely which Python version to install also). Run the following

commands from a terminal window:

conda create -n name_of_my_env python

This will create a minimal environment with only Python

installed in it. To put your self inside this environment run:

source activate name_of_my_env

On Windows the command is:

activate name_of_my_env

The final step required is to install pandas. This can be done

with the following command:

conda install pandas

To install a specific pandas version:

conda install pandas=0.13.1

To install other packages, IPython for example:

conda install ipython

To install the full

Anaconda

distribution:

conda install anaconda

If you require any packages that are available to pip but not

conda, simply install pip, and use pip to install these

packages:

conda install pip

pip install django

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值