Install a Python package into a different director

2018-12-31 13:49发布

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?

标签: python pip
13条回答
何处买醉
2楼-- · 2018-12-31 14:49

Nobody seems to have mentioned the -t option but that the easiest:

pip install -t <direct directory> <package>
查看更多
登录 后发表回答