Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install particular version with easy_install

I'm trying to install lxml. I've had a look at the website, and version 2.2.8 looked reasonable to me but when I did easy_install lxml, it installed version 2.3.beta1 which is not really what I want I presume.

What is the best way to fix this and how can I force easy_install to install a particular version?

(Mac os x 10.6)

like image 898
dr jerry Avatar asked Sep 30 '10 17:09

dr jerry


People also ask

How do I install a specific version of a python package?

How do I Install a Specific Version of a Python Package? To install a specific version of a Python package you can use pip: pip install YourPackage==YourVersion . For example, if you want to install an older version of Pandas you can do as follows: pip install pandas==1.1. 3 .

How do I install specific versions on setuptools?

To use a specific version of setuptools it is necessary to have it in both locations - in pyproject. toml and at the beginning of install_requires of setup.py. The tool like pip will use the version from pyproject. toml to build the project.

Is easy_install deprecated?

easy_install, now deprecated, was released in 2004 as part of setuptools. It was notable at the time for installing packages from PyPI using requirement specifiers, and automatically installing dependencies.


1 Answers

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)

like image 80
Ben James Avatar answered Sep 20 '22 06:09

Ben James