How to install a Python package into a different directory using pip?

PythonServer Side ProgrammingProgramming

You can specify the install-option CLI argument to set the prefix path of the installation directory while installing a new module. For example, if you want to install your package to /tmp, then run the following command −

pip install --install-option="--prefix=/tmp" package_name
Updated on 18-Feb-2020 05:52:08