无法正确创建conda环境

当我使用下载dgl环境的时候,出现

CondaError: Failed to write to /data/xxx/.conda/pkgs/mkl-2021.4.0-h06a4308_640.conda

errno: 28

Errno 28\] No space left on device InvalidArchiveError("Error with archive /data/xxx/.conda/pkgs/libgfortran5-11.2.0-h1234567_1/.cph_tmp42_mjil9/pkg-libgfortran5-11.2.0-h1234567_1.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\\n\\nFailed to create dir 'share'") 很明显是没有使用空间了,需要清理一下缓存。于是使用命令 conda clean --all 进行清理。 ![](https://i-blog.csdnimg.cn/direct/f07e3753f42848a09f53c863fe3ca4a6.png) 是的!没看错!我居然吧tempfiles文件和logfile文件都清理了!!! 但是到这我并没有在意,毕竟再次安装dgl成功了。但运行程序发现又出现了新的错误: INTEL MKL ERROR: /data/xxxx/.conda/envs/regcn/lib/python3.8/site-packages/mkl/../../../libmkl_core.so.1: invalid ELF header. Intel MKL FATAL ERROR: Cannot load libmkl_core.so.1. 于是我卸载mkl,又进行了重装。结果又说找不到dgl了。 ModuleNotFoundError: No module named 'dgl' 我只能再重新安装dgl。但dgl成功安装之后,又出现了上述的mkl错误,,,出于好奇的心里,我再次卸载mkl,这次错误不一样了,出现了一长串conda环境错误: Collecting package metadata (repodata.json): failed # \>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\> ERROR REPORT \<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\< Traceback (most recent call last): File "/home/xxx/anaconda3/lib/python3.9/site-packages/conda/core/xxx.py", line 232, in _load mtime = getmtime(self.cache_path_json) File "/home/xxx/anaconda3/lib/python3.9/site-packages/conda/core/xxxx.py", line 200, in cache_path_json ... FileNotFoundError: \[Errno 2\] No usable temporary directory found in \['/tmp', '/var/tmp', '/usr/tmp', '/data/xxx/我的项目地址'

`$ /home/xxxx/anaconda3/bin/conda uninstall mkl`

environment variables:

CIO_TEST=<not set>

CLASSPATH=.:/usr/lib/jvm/java-8-openjdk-

amd64/lib/dt.jar:/usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar

CONDA_DEFAULT_ENV=rxxx

CONDA_EXE=/home/xxx/anaconda3/bin/conda

CONDA_PREFIX=/data/xxxxx/.conda/envs/regcn

CONDA_PREFIX_1=/home/xxxxxx/anaconda3

CONDA_PROMPT_MODIFIER=(xxxxx)

CONDA_PYTHON_EXE=/home/xxxx/anaconda3/bin/python

CONDA_ROOT=/home/xxxxx/anaconda3

CONDA_SHLVL=2

CURL_CA_BUNDLE=<not set>

LD_LIBRARY_PATH=/data/xxxxxx/.conda/envs/xxxxx/lib:/usr/local/cuda-10.1/lib64

PATH=/xxxxxxxxxxxxxxxx:

/xxxxxxxxxxxx:/usr/lib/jvm/java-8-openjdk-amd64/bin:/usr/

REQUESTS_CA_BUNDLE=<not set>

SSL_CERT_FILE=<not set>

active environment : xxxxxxxx

active env location : /data/xxxxxxxxx/.conda/envs/regcn

shell level : 2

user config file : /data/xxx/.condarc

populated config files :

conda version : 22.9.0

conda-build version : 3.21.5

python version : 3.9.7.final.0

virtual packages : __cuda=12.0=0

__linux=5.4.0=0

__glibc=2.27=0

__unix=0=0

__archspec=1=x86_64

base environment : /home/xxxxxx/anaconda3

conda av data dir : /home/xxxx/anaconda3/etc/conda

conda av metadata url : None

channel URLs : https://repo.anaconda.com/pkgs/main/linux-64

https://repo.anaconda.com/pkgs/main/noarch

https://repo.anaconda.com/pkgs/r/linux-64

https://repo.anaconda.com/pkgs/r/noarch

package cache : /home/xxxx/anaconda3/pkgs

/data/xxxxxxxxxx/.conda/pkgs

envs directories : /data/xxxxxxxxx/.conda/envs

/home/xxxxxxxxx/anaconda3/envs

platform : linux-64

user-agent : conda/22.9.0 requests/2.28.1 CPython/3.9.7 Linux/5.4.0-152-generic ubuntu/18.04.6 glibc/2.27

UID:GID : 1052:1054

netrc file : None

offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve

future releases of conda.

Would you like conda to send this report to the core maintainers? [y/N]: y

Upload did not complete.

Thank you for helping to improve conda.

Opt-in to always sending reports (and not see this message again)

by running

$ conda config --set report_errors true

这时候我才发现我的tmp文件没有了!!!

当我conda create -n xxx的时候 同样也会出现上述的错误。。。。

于是我修改了环境变量

nano ~/.bashrc 修改环境

在最后一行加入 export TMPDIR=/你的tmp地址

source ~/.bashrc 重启环境

检查

成功解决conda环境问题

相关推荐
水母哟 ( ̄^ ̄)ゞ1 天前
Anaconda安装报错记录“usage: conda-script.py [-h] [--no-plugins] [-v] command
conda
Johny_Zhao2 天前
Conda、Anaconda、Miniconda对比分析
linux·网络安全·信息安全·kubernetes·云计算·conda·shell·containerd·anaconda·yum源·系统运维·miniconda
zhanghongyi_cpp3 天前
linux的conda配置与应用阶段的简单指令备注
linux·python·conda
躺不平的小刘6 天前
从YOLOv5到RKNN:零冲突转换YOLOv5模型至RK3588 NPU全指南
linux·python·嵌入式硬件·yolo·conda·pyqt·pip
yuanpan8 天前
ubuntu系统上的conda虚拟环境导出方便下次安装
linux·ubuntu·conda
runfarther9 天前
uv与conda的区别及选择指南
语言模型·conda·ai编程·uv
抠头专注python环境配置9 天前
OCR库pytesseract安装保姆级教程
python·ocr·conda
抠头专注python环境配置10 天前
Pytorch GPU版本安装保姆级教程
pytorch·python·深度学习·conda
wjf6300011 天前
Conda创建py3.10环境(股票),并且安装程序包的命令
conda
trayvontang11 天前
Python虚拟环境与包管理工具(uv、Conda)
python·conda·uv·虚拟环境·miniconda·miniforge