After I installed the conda, I still cannot call the conda. And I follow the below steps to add the path.
sudo gedit ~/.bashrc
export PATH= "/home/howard/anaconda3/bin:$PATH"
sudo gedit /etc/profile
export PATH="/home/howard/anaconda3/bin:$PATH"
source /etc/profile
However, the situation even worst. I cannot call conda and nvcc. "not found" Also, when I restart the terminal, it say
bash:
export: /home/username/anaconda3/bin:/usr/local/cuda/bin:/usr/local/cuda-10.0/bin:/usr/local/cuda-11.1/bin:/usr/local/cuda-11.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda/bin':
not a valid identifier
When I wanna get back to ~/.bashrc
to delete the export path, by using sudo gedit ~/.bashrc
It tells bash: sudo: No such file or directory
Can anyone help?
sudo
is going to have a different definition of~
compared to your ordinary user. try issuing the command with the full path the.bashrc
file, e.g.sudo gedit /home/myusername/.bashrc
but of course you'll need to change that path to match your actual path. – Robert Crovella Dec 02 '20 at 02:30/home
may not be correct either. As ordinary user, do:cd ~
then dopwd
. Then paste that output into your question. – Robert Crovella Dec 02 '20 at 02:35cd ~
then hit the enter key. After hitting the enter key, typepwd
, then hit the enter key again. After hitting the enter key the second time, observe what is printed out at that point in your console, and copy and paste that here. – Robert Crovella Dec 02 '20 at 02:38/home/user1
then dols -a
. Is there a file called.bashrc
listed? – Robert Crovella Dec 02 '20 at 02:39=
inexport PATH= "/home/howard/anaconda3/bin:$PATH"
. Because you messed upPATH
you will need to call programs with their full paths like/bin/ls
or/usr/bin/sudo gedit ~/.bashrc
. In future DON'T usesudo
to edit files in~
(but you will probably need to do so now because they have likely become owned byroot
) – steeldriver Dec 02 '20 at 03:40