您的位置:首页 > 编程语言 > Python开发

使用conda安装Python第三方工具包

2017-04-16 12:49 891 查看
最近在学习Zipline框架,在安装的过程中遇到了一些问题,简单记录如下

个人开发环境:Anaconda(纯净的Python2.7,这个一直没用过)

尝试用之前的pip,没有成功。后来在网上查到了conda指令

一、Intro to conda

Package, dependency and environment management for any language: Python, R, Scala, Java, Javascript, C/ C++, FORTRAN

conda提供了对包、依赖、开发环境的管理,支持Python、Java、c++等多种语言
以下文字来自 https://conda.io/docs/intro.html ,阅读应该不难
Conda is a package manager application that quickly installs, runs, and updates packages and their dependencies. The conda command is the primary interface for managing installations of various packages. It can query and search
the package index and current installation, create new environments, and install and update packages into existing conda environments. See our Using conda section for more information.

Conda is also an environment manager application. A conda environment is a directory that contains a specific collection of conda packages that you have installed. For example, you may have one environment with NumPy 1.7 and its dependencies, and another environment
with NumPy 1.6 for legacy testing. If you change one environment, your other environments are not affected. You can easily activate or deactivate (switch between) these environments. You can also share your environment with someone by giving them a copy of
your environment.yaml file.

上文中,大概提到了第三方包的安装、更新、卸载,显示安装包目录等等。但是关于环境管理挺不好理解的:

运行不同的Python程序,需要使用不同版本的Python(2.x或3.x)(对不同的Python项目,我们可以实现开发环境的隔离)

在同一中Python版本中,可能需要用到不同版本的第三方包,例如:Django 1.6或者Django 1.7
这也解牵涉到了所谓的虚拟环境,在Python中,conda指令可以对虚拟环境进行有效的控制,安装、克隆、切换、删除等等

what is difference between pip and conda?

既然都是关于python的包管理工具为什么有了pip 我们还需要conda?我们来看看stackoverflow上的解答
我直接附上网站吧,需要的同学直接去看原味的解释
What is the difference between pip and conda?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: