What is the -t flag for pip?


I was advised to use pip install module-name -t /path/to/project-dir, but I did not understand what the t flag is for. Can someone help me?

Asked By: Thiago Krempser



From the manual:

-t, --target <dir>
     Install packages into <dir>.
     By default this will not replace existing files/folders in <dir>.
     Use --upgrade to replace existing packages in <dir> with new versions.
Answered By: plaes

At the time of writing, OP has 4 thumbs down because the question was worded in granular manner not indicative of the real problem, paraphrased below:

“Why does the –help option not display all possible flags that the pip command supports, and their usages?”

More are covered in the manual page link that user:plaes provided, such as “-r” for requirements.

Answered By: Jordan Stefanelli
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.