Linux 没有root权限怎么安装python第三方包 matplotlib

来源:互联网 发布:淘宝店铺被监控怎么办 编辑:程序博客网 时间:2024/04/27 17:41


转自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 是为了使用国内的清华大学的镜像,速度快很多





原创粉丝点击