pip icon indicating copy to clipboard operation
pip copied to clipboard

there is very little documetation for the --target flag

Open whitequill opened this issue 1 year ago • 3 comments

What's the problem this feature will solve?

I want to bring awareness to the lack of documentation of the flag --target. I was building a version of blender and I wanted it to have its own python that I cloned into ./blender/extern. This posed a problem cause when I was installing python into extern there isn't an obvious way to use pip to install to a specified path. One can look at the documentation and man file and info file and there is no mention of the --target flag anywhere.

I'm sure there are others who need to install pip packages to a custom path. Why is there no documentation on official sources?

Describe the solution you'd like

I would like documentation of the --target flag to be included in all official documentation and be easily findable though search engines.

Alternative Solutions

post documentation of forums and other supplemental media about the `--target' flag and its uses.

Additional context

I feel what I have written is clear and I don't feel any additional context is needed. the --target flag either needs to be better documented or information about its deprecation needs to be documented and publicized.

Code of Conduct

whitequill avatar May 01 '24 01:05 whitequill

the way I am using the --target flag is like this: sudo ${HOME}/gitrepos/blender/extern/python/bin/pip3.12 install pybullet requests zstandard numpy brotli pyblas numpy --target ${HOME}/gitrepos/blender/extern/python/lib/python3.11/site-packages

whitequill avatar May 01 '24 01:05 whitequill

While your point about documentation is fair (there is some documentation, under the command options for pip install) for this use case I think you should be using --prefix.

Documentation on the use of, and differences between, --prefix, --root, and --target would be useful, the problem is likely to be finding someone who understands the subtle differences and which flags are appropriate for which use cases 🙁

pfmoore avatar May 01 '24 07:05 pfmoore

I did find the information here on the official webpage: https://pip.pypa.io/en/stable/cli/pip_install/. Google and other search engines don't send you here when one is looking for the information.

whitequill avatar May 01 '24 20:05 whitequill