First and obvious question: why don’t you just install the package from PyPI?
sudo pip install sphinx
If you want to install anything that has a setup.py file with pip you can use the --editable flag:
-e, --editable <path/url>Install a project in editable mode (i.e. setuptools “develop mode”) from a local project path or a VCS url.
So you can just issue the command (prefix with sudo if necessary):
pip3 install -e /path/to/pkg
where /path/to/pkg is the directory where setup.py can be found (where you extracted the files).
To answer the other questions:
-
--root <dir>is used to change the root directory of the file system wherepipshould install package resources, not to change where to find the package. -
--targetis used to tellpipin which folder to install the package. -
--install-optionis used to set some variables that will be used bysetup.py, not to change wherepipshould look for the file.