转自stackoverflow
https://stackoverflow.com/questions/7465445/how-to-install-python-modules-without-root-access
问题:
How to install python modules without root access?
解决方法:
In most situations the best solution is to rely on the so-called "user site" location (see the PEP for details) by running:
pip install --user package_name
我本来想安装 matplotlib 的,试了很久,用In most situations the best solution is to rely on the so-called "user site" location (see the PEP for details) by running:
pip install --user -i
https:
//pypi
.tuna.tsinghua.edu.cn
/simple
matplolib-i 是为了使用国内的清华大学的镜像,速度快很多