0 votes
1 view
in Python by (47.8k points)

I know the obvious answer is to use virtualenv and virtualenvwrapper, but for various reasons, I can't,/don't want to do that.

So how do I modify the command

pip install package_name

to make pip install the package somewhere other than the default site-packages?

1 Answer

0 votes
by (107k points)

There are many ways to install a Python package into a different directory using pip some of them are as follows:-

You can use the below-mentioned command for installing a Python package into a different directory:-

pip install --target=d:\somewhere\other\than\the\default package_name

Another way you can use for installing a Python package into a directory is:

pip install --install-option="--prefix=$PREFIX_PATH" package_name

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...