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 wherepip
should install package resources, not to change where to find the package. -
--target
is used to tellpip
in which folder to install the package. -
--install-option
is used to set some variables that will be used bysetup.py
, not to change wherepip
should look for the file.