【Linux】sudo pip 找不到命令解决方法
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
问题描述:
当我们为Linux安装pip之后,使用pip install来安装python包时,仍然提示:sudo: pip: command not found
解决方法:
(1)编辑/etc/sudoers:
sudo vim /etc/sudoers
将Defaults env_reset修改为:
Defaults !env_reset
(2)编辑配置文件~/.bashrc:
sudo vim ~/.bashrc
添加:
alias sudo='sudo env PATH=$PATH'
使修改生效:
source ~/.bashrc
这时,使用sudo pip安装就可以安装成功了。




A beautiful web dashboard for Linux
最近提交(Master分支:21 天前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)