Error: Could not installed packages due to anOSError: [Errno 28] No space left on device

文章讲述了作者在安装Torch时遇到磁盘空间不足的错误,尝试了清理磁盘空间和cache但无效。最终通过将~/.cache复制到其他目录并创建软链接解决了问题。
摘要由CSDN通过智能技术生成

Error: Could not installed packages due to anOSError: [Errno 28] No space left on device

前言

安装torch时出现标题所示报错。

尝试1(失败)

可能是磁盘占用过多,查看磁盘占用情况:df -h,发现剩余空间绰绰有余。但还是使用sudo apt autoremove --purge snapd清理了下。果然没有任何用,继续报同样的错。

尝试2(失败)

可能是cache空间不足,于是使用TMPDIR=/media/ashwin/SSD/ttyao/pip_cache/ pip install --cache-dir=/media/ashwin/SSD/ttyao/pip_cache/ torch-1.7.1+cu110 torchvisi on=0.8.2+cu110 torchaudio=0.7.2 -f https: //download.pytorch.org/whl/torch_stable.html,仍旧报错。

尝试3(成功)

因为是别人的电脑,不敢随便清空~/.cache,所以把~/.cache复制到了一个空间充足的目录下,并将home目录下的.cache删除,然后在home目录下建立复制后.cache的软链接:

  1. sudo cp -r ~/.cache [target]
  2. rm -rf ~/.cache
  3. ln -s [target] ~/.cache

成功!

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ERROR: Could not install packages due to an OSError: [WinError 32] is a common error message that occurs when there is a problem with installing packages on a Windows operating system. This error is usually caused by a file or process being locked by another program, preventing the installation process from accessing it. To resolve this issue, you can try the following solutions: 1. Close other programs: Make sure that no other programs are using the files or processes that the installation process requires. Close any unnecessary programs and try installing the packages again. 2. Restart your computer: Sometimes, a simple restart can resolve the issue by releasing any locked files or processes. After restarting, try installing the packages again. 3. Run the installation as an administrator: Right-click on the installation file or command prompt and select "Run as administrator". This will give the installation process the necessary permissions to access and modify files. 4. Disable antivirus software: Antivirus software can sometimes interfere with the installation process. Temporarily disable your antivirus software and try installing the packages again. Remember to re-enable it once the installation is complete. 5. Use a virtual environment: Create a virtual environment for your project and install the packages within that environment. This can help isolate any conflicts with other installed packages or system configurations. If none of these solutions work, you may need to provide more specific details about the packages you are trying to install and the steps you have taken so far.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值