Ubuntu遇到问题“Could not install packages due to an EnvironmentError: [Errno 13] 权限不够: ”

Ubuntu在使用一些pip的时候会遇到:“Could not install packages due to an EnvironmentError: [Errno 13] 权限不够:”的问题。

在正常的命令后面加一个 --user即可:

在使用pip的相关命令时,使用国内源的速度更快:如下是使用了清华的国内源。

 pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/ --user

这样会将Python 程序包安装到 $HOME/.local 路径下,其中包含三个字文件夹:bin,lib 和 share。
如果是配置了pip镜像源文件,则使用下面的命令:

技术图片

 

文章来自:https://www.cnblogs.com/xinmomoyan/p/10386151.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3