Computer >> Computer tutorials >  >> Programming >> Python

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


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