无法正确创建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环境问题

相关推荐
王 富贵5 天前
Conda常用命令大全
windows·conda
慕无言5 天前
pycharm2024选择conda环境
conda
灯下夜无眠6 天前
conda打包环境上传spark集群
大数据·spark·conda
YuSun_WK8 天前
使用conda配置环境时遇到的问题
conda
Caven778 天前
【Linux 技巧】如何在登录时自动激活 Conda Base 环境
linux·运维·conda
梁辰兴8 天前
PyCharm使用了Conda的虚拟环境创建的的Python项目,下载库(包)到该项目的虚拟环境中
python·pycharm·conda·错误·异常·异常报错
qq_203769498 天前
在conda环境中使用jupyter
python·jupyter·conda
中科院提名者9 天前
Conda与Pip混用导致的“幽灵包”现象
conda·pip
Victory_orsh10 天前
Conda常用命令集锦
conda
努力还债的学术吗喽13 天前
ffmpeg离线安装到服务器:解决conda/sudo/无法安装的通用方案
服务器·ffmpeg·conda