I installed Conda through Miniconda on my laptop running Linux CentOS 7.
If I run the command conda update conda
, I get the following error:
conda update conda
Solving environment: failed
NotWritableError: The current user does not have write permissions to a required path.
path: /path/to/custom/dir/pkgs/urls.txt
uid: 1000
gid: 1000
If you feel that permissions on this path are set incorrectly, you can manually
change them by executing
$ sudo chown 1000:1000 /path/to/custom/dir/pkgs/urls.txt
In general, it's not advisable to use 'sudo conda'.
I've no idea on how to solve this issue; I also asked on the Bioconda GitHub page but nobody replied.
Any suggestion on how to solve this problem? Thanks
This is discussed in conda issue #7267 ( https://github.com/conda/conda/issues/7267 ).
You may have logged in using sudo, perhaps as sudo -u davide bash
?
If so, then the following command will show SUDO_COMMAND as the command used to become the user, as well as SUDO_USER, SUDO_UID and SUDO_GID:
$ set | grep SUDO
You can instead use sudo su - davide
to get a clean context with no SUDO definitions.
I encountered the same issue when administering a shared conda environment via ansible. My solution was to use the following to operate as the conda package owner:
- name: update conda environment
command: conda update -y --all
become: yes
become_user: conda
become_method: su
Whether or not it is a good idea to share an anaconda installation on a cluster is a separate question.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.