gpt4 book ai didi

python - 尝试卸载 Nose 时权限被拒绝

转载 作者:太空宇宙 更新时间:2023-11-03 16:27:40 25 4
gpt4 key购买 nike

我一直很难在我的 Mac 上正确安装 Nose 。该网站上的很多人过去都遇到过这个问题,我是按照过去帖子的说明进行操作的。终端中显示nose已安装并升级。

pip install nose

当我尝试卸载 Nose 时,我得到了这个:

异常(exception):

Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip/commands/uninstall.py", line 76, in run requirement_set.uninstall(auto_confirm=options.yes) File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 336, in uninstall req.uninstall(auto_confirm=auto_confirm) File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 742, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/Library/Python/2.7/site-packages/pip/utils/init.py", line 267, in renames shutil.move(old, new) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 303, in move os.unlink(src) OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/nose-1.3.7.dist-info/DESCRIPTION.rst'

我该怎么做才能正确安装 Nose 。谢谢!

最佳答案

如果权限被拒绝,那么您应该尝试使用 super 用户权限卸载它。也就是说,运行sudo pip uninstall noose

关于python - 尝试卸载 Nose 时权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37866939/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com