I am using pip install
with the --target
option instead of using virtualenvs for particular reasons. However, although I'd expect it to behave similarly to virtualenvs, I have stumbled into a strange problem.
When using pip install package -t /path/to
a second time, instead of skipping the execution of the package's setup.py with the message Requirement already satisfied (use --upgrade to upgrade):...
, pip will still run setup.py (which can take quite a while sometimes). Only after running it, pip detects that the directory already exists.
Target directory /path/to/package already exists. Specify --upgrade to force replacement.
Is there any way I can force pip not to run the package's setup.py
when the package is already installed in the custom directory?