conda env pip install error:No space left on device

conda 环境 pip install error:No space left on device


文章目录

  • [conda 环境 pip install error:No space left on device](#conda 环境 pip install error:No space left on device)
  • 现象
    • [1 实验](#1 实验)
    • [2 分析和解决办法](#2 分析和解决办法)

现象

非root用户的服务器,需要安装环境,安装的环境超过2GB

python 复制代码
sudo pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn --default-timeout=1000

报错:
pip install No space left on device

1 实验

参考了网上很多解决办法比如:

不使用本地缓存 no-cache-dir

python 复制代码
pip install --no-cache-dir

修改pip cache-dir的位置

vim ~/.bashrc

python 复制代码
export TMPDIR=/home/pip_cache

还是不行

2 分析和解决办法

以上为什么不行,因为当前环境是非root用户,因此,修改pip cache-dir是失败的;那么通过以下命令监测当前环境的内存情况,发现

python 复制代码
watch -n 1 df -h

数据默认存在/tmp中,通过动态监测,因为安装的内容超过了1G,导致很快盘符用完,因此,解决办法就是,对/tmp进行扩容即可。

相关推荐
万粉变现经纪人20 小时前
如何解决 pip install mysqlclient 报错 ‘mysql_config’ not found 问题
数据库·python·mysql·pycharm·bug·pandas·pip
乘风对月歌1 天前
conda 或 vscode 中没有的虚拟环境
ide·vscode·conda
比奇堡的猪猪1 天前
修改默认conda环境(在win中)
python·conda
hui函数2 天前
如何解决 pip install 编译报错 ‘cl.exe’ not found(缺少 VS C++ 工具集)问题
开发语言·c++·pip
hui函数2 天前
Python系列Bug修复|如何解决 pip install 安装报错 invalid command ‘bdist_wheel’(缺少 wheel)问题
python·bug·pip
hui函数2 天前
Python系列Bug修复|如何解决 pip install -r requirements.txt 私有索引未设为 trusted-host 导致拒绝 问题
python·bug·pip
hui函数2 天前
Python系列Bug修复|如何解决 pip install 安装报错 Backend ‘setuptools.build_meta’ 不可用 问题
python·bug·pip
hui函数2 天前
Python系列Bug修复|如何解决 pip install -r requirements.txt 私有仓库认证失败 401 Unauthorized 问题
python·bug·pip
hui函数2 天前
Python系列Bug修复|如何解决 pip install -r requirements.txt 子目录可编辑安装缺少 pyproject.toml 问题
python·bug·pip
视图猿人2 天前
Conda的安装和使用-jupyter notebook
conda