Installing Python egg dependencies without apt-get
I have a Python module that is distributed to PyPI and is therefore installed using easy_install
. It depends on lxml, which in turn depends on libxslt1-dev. I can't install libxslt1-dev with easy_install
, so it doesn't work to put it in install_requires
. Is there a way to get setuptools to install it instead of resorting to apt-get
?
a source to share
setuptools can only install Python packages that you are using in the package index, or by default the index of the one you specify witheasy_install -i http://myindex.site/index
.
Any non-Python dependencies must be installed using the standard platform installer (apt-get on Debian distributions). libxml2
and libxslt
fall into this category, so you should install them in the standard way.
a source to share
Better to use apt-get to install lxml (or python packages with c extensions) and then pull the pure python package from pypi. Also I try to avoid using easy_install for top level installation, I rather create a virtual env using virtualenv and then use easy_install created by virtualenv to keep my settings clean.
This strategy has worked successfully for me in several production environments.
a source to share