我怎样才能移除我的水蟒环境?

2024-10-02 16:22:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我在MacOSX上工作。我创建了一个名为python2env的conda环境。你可以在这里看到:

conda info --envs
# conda environments:
#
python2env               /Users/user/anaconda/envs/python2env
..
root                  *  /Users/user/anaconda

我尝试使用以下命令删除它:

^{pr2}$

然后,我检查了它是否被移除了:

conda info --envs
# conda environments:
#
python2env               /Users/user/anaconda/envs/python2env
..
root                  *  /Users/user/anaconda

但它还在那里!在

我试过conda remove --name python2env --all但没有成功。环境仍在列表中。在

我怎样才能移除我的水蟒环境?在

jentjr的avdvice更新:

~ conda remove --name python2env --all --debug

DEBUG conda.gateways.disk.test:prefix_is_writable(65): testing write access for prefix '/Users/user/anaconda' using path '/Users/user/anaconda/conda-meta/history'
DEBUG conda.gateways.disk.test:prefix_is_writable(65): testing write access for prefix '/Users/user/anaconda' using path '/Users/user/anaconda/conda-meta/history'

Remove all packages in environment /Users/user/anaconda/envs/python2env:

Proceed ([y]/n)? y

DEBUG conda.gateways.disk.permissions:make_writable(36): tried make writable but failed: /Users/user/anaconda/envs/python2env/static/css/img/igv_logo_letters_paths.svg
PermissionError(1, 'Operation not permitted')

~ conda remove -p /Users/user/anaconda/envs/python2env --all --debug 
DEBUG conda.gateways.disk.test:prefix_is_writable(65): testing write access for prefix '/Users/user/anaconda' using path '/Users/user/anaconda/conda-meta/history'

Remove all packages in environment /Users/user/anaconda/envs/python2env:

Proceed ([y]/n)? y

DEBUG conda.gateways.disk.permissions:make_writable(36): tried make writable but failed: /Users/user/anaconda/envs/python2env/static/css/img/igv_logo_letters_paths.svg
PermissionError(1, 'Operation not permitted')
INFO conda.gateways.disk.delete:rm_rf(59): rm_rf failed for /Users/user/anaconda/envs/python2env

使用--debug或指定环境的完整路径都无法删除它。我将尝试使用chmod使环境可写,再试一次并更新我的帖子。在


Tags: debugforprefixmake环境anacondaallconda