ERROR conda.core.link:_execute(502): An error occurred while installing package '<unknown>::ninja-1.7.2-0'.
PermissionError(13, 'Permission denied')
这样执行来解决:
sudo env "PATH=$PATH" conda install pytorch torchvision
It's Permission denied, So just sudo chown -R frazier:frazier /home/frazier/anaconda3
PS: change 'frazier' to your user name.
You have installed Anaconda with sudo or root user. You need to install it with normal ubuntu/<Your username>
user. Remove or take backup of the already installed Anaconda (/home/<user>/anaconda3
). With normal mode install anaconda ( bash conda_installer_script
) .
Check .bashrc for this line and validate it.
export PATH="/home/<username>/anaconda3/bin:$PATH"
If not add it with proper anaconda path .
Reload .bashrc file and check conda is working by conda list command.
Now you can do conda update conda
answered Mar 10 at 3:08
607616
-
Please note that this
export PATH
thing is no longer the way to proceed forconda>=4.4
. It should be replaced bysource <path_to_conda>/etc/profile.d/conda.sh
. – FabienP Jun 16 at 19:41
add a comment
up vote 0 down vote
All conda commands must be run without super user privileges. That's why sudo conda
command doesn't work.
You may have run conda installation bush file with super user privileges while installing. The user (david
) running conda doesn't have write permissions to paths(/home/david/anaconda3
) it needs to modify in the environment, then conda can't do anything. To solve this problem you need to change permissions to paths (/home/david/anaconda3
).
To change permissions to paths (/home/user/anaconda3
) using:
sudo chown -R user /home/user/anaconda3
sudo env "PATH=$PATH" conda update conda