Search code examples
pythonpip

What is the -t flag for pip?


I was advised to use pip install module-name -t /path/to/project-dir. What does the -t flag mean in this command?


Solution

  • 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.