使用 easy_Install 安装特定版本

我正在安装 lxml。我看了一下这个网站,2.2.8版本对我来说很合理,但是当我做 easy_install lxml的时候,它安装了2.3版本。我猜这不是我想要的。

解决这个问题的最佳方法是什么? 如何强制 easy _ install 安装特定的版本?

(Mac OS x 10.6)

52788 次浏览

I believe the way to specify a version would be like this:

easy_install lxml==2.2.8

I (and most other Python users I suspect) stopped using easy_install and started using pip some time ago, so a solution in those terms is:

easy_install pip
pip install lxml==2.2.8

(pip has several benefits, including an uninstall command)

From the easy_install documentation:

easy_install PackageName==1.2.3

You should do something like this:

easy_install "lxml==2.2.8"