【发布时间】:2017-06-15 14:50:42
【问题描述】:
我尝试安装 Anaconda 以一次获取多个 python 包,但 python IDLE 出现了一些问题,上面写着No package found,所以必须手动设置~/.bashrc 中的路径。
一旦我在~/.bashrc 中设置了路径,python IDLE 中的IMPORT ERROR 就解决了,但我现在无法在终端上使用命令。
我一直收到这个错误。
sid@sids-ubuntu:~$ ls
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found
sid@sids-ubuntu:~$ sudo
Command 'sudo' is available in '/usr/bin/sudo'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
sudo: command not found
sid@sids-ubuntu:~$ mkdir aa
Command 'mkdir' is available in '/bin/mkdir'
The command could not be located because '/bin' is not included in the PATH environment variable.
mkdir: command not found
我做了export PATH=/usr/bin:/bin 来找出我的$PATH 和/etc/environment 的内容。好像两者都不一样。
sid@sids-ubuntu:~$ export PATH=/usr/bin:/bin
sid@sids-ubuntu:~$ echo $PATH
/usr/bin:/bin
sid@sids-ubuntu:~$ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
Ubuntu 不是在 /etc/environment 中寻找 $PATH 吗?
如果是,我的$PATH 与/etc/environment 不同的原因可能是什么?请帮我修复它!
如果没有,Ubuntu 在哪里寻找$PATH?请帮我解决它!
【问题讨论】:
标签: bash shell ubuntu terminal path