I have used pip to install PIL. It requires two additional arguments while installation. So the command for installation looks something like this.
pip install PIL --allow-external PIL --allow-unverified PIL
I need to add the PIL package in setup.py file. Adding PIL in the install_requires
list do install PIL but it doesn't work, as I need to install PIL with the additional arguments.
So how can I add the PIL to the install_requires
list with additional arguments ?
Just replace PIL with Pillow (in your install_requires). It's a fork of PIL with bugfixes, py3k support and proper hosting. You don't need to change your code.
Currently, there is no way to specify extra arguments in
install_requires
in setup.py. But, I solved my problem of installing dependencies withglobal-options
by sub-classingsetuptools.command.install
class and overriding itsrun()
method, like following code -