我正在使用 bash 脚本为项目创建 conda 环境。 bash 脚本使用
mamba create
命令。我已经使用他们的官方指南安装了曼巴。但是,当我运行脚本时,我收到一条错误消息;
RuntimeError: Download error (28) Timeout was reached [https://conda.anaconda.org/conda-forge/linux-64/cudnn-8.9.7.29-hbc23b4c_3.conda]
Operation too slow. Less than 30 bytes/sec transferred the last 60 seconds
这里我附上了终端的输出。请注意,软件包列表部分已被删除,以使其更短。
> bash setup-env.sh my-conda-env
Looking for: ['transformers', 'python=3.10', 'pytorch', 'fairscale', 'dask-mongo', 'torchaudio', 'pytorch-cuda=11.7', 'iopath', 'cudatoolkit=11.7']
pytorch/linux-64 Using cache
pytorch/noarch Using cache
nvidia/linux-64 Using cache
nvidia/noarch Using cache
conda-forge/linux-64 Using cache
conda-forge/noarch Using cache
iopath/linux-64 No change
iopath/noarch No change
warning libmamba Package tarball '/home/akila-i/miniforge3/pkgs/ucx-1.14.1-h64cca9d_5.conda' is invalid
warning libmamba Package tarball '/home/akila-i/miniforge3/pkgs/libopenblas-0.3.27-pthreads_h413a1c8_0.conda' is invalid
warning libmamba Package tarball '/home/akila-i/miniforge3/pkgs/libgoogle-cloud-2.12.0-hac9eb74_1.conda' is invalid
warning libmamba Package tarball '/home/akila-i/miniforge3/pkgs/libcufft-10.7.2.124-h4fbf590_0.tar.bz2' is invalid
warning libmamba Package tarball '/home/akila-i/miniforge3/pkgs/libnpp-11.7.4.75-0.tar.bz2' is invalid
Transaction
Prefix: /home/akila-i/miniforge3/envs/picssmart
Updating specs:
- transformers
- python=3.10
- pytorch
- fairscale
- dask-mongo
- torchaudio
- pytorch-cuda=11.7
- iopath
- cudatoolkit=11.7
Package Version Build Channel Size
────────────────────────────────────────────────────────────────────────────────────────
Install:
────────────────────────────────────────────────────────────────────────────────────────
-- List is removed as its too long --
Summary:
Install: 201 packages
Total download: 3GB
────────────────────────────────────────────────────────────────────────────────────────
This is error report
Download error (28) Timeout was reached [https://conda.anaconda.org/conda-forge/linux-64/cudnn-8.9.7.29-hbc23b4c_3.conda]
Operation too slow. Less than 30 bytes/sec transferred the last 60 seconds
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/akila-i/miniforge3/lib/python3.10/site-packages/conda/exception_handler.py", line 17, in __call__
return func(*args, **kwargs)
File "/home/akila-i/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 959, in exception_converter
raise e
File "/home/akila-i/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 952, in exception_converter
exit_code = _wrapped_main(*args, **kwargs)
File "/home/akila-i/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 898, in _wrapped_main
result = do_call(parsed_args, p)
File "/home/akila-i/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 767, in do_call
exit_code = create(args, parser)
File "/home/akila-i/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 602, in create
return install(args, parser, "create")
File "/home/akila-i/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 558, in install
transaction.fetch_extract_packages()
RuntimeError: Download error (28) Timeout was reached [https://conda.anaconda.org/conda-forge/linux-64/cudnn-8.9.7.29-hbc23b4c_3.conda]
Operation too slow. Less than 30 bytes/sec transferred the last 60 seconds
`$ /home/akila-i/miniforge3/bin/mamba create -n my-conda-env transformers python=3.10 pytorch fairscale dask-mongo torchaudio pytorch-cuda=11.7 iopath cudatoolkit=11.7 -c pytorch -c nvidia -c iopath -c conda-forge -y`
environment variables:
CIO_TEST=<not set>
CONDA_DEFAULT_ENV=base
CONDA_EXE=/home/akila-i/miniforge3/bin/conda
CONDA_PREFIX=/home/akila-i/miniforge3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=/home/akila-i/miniforge3/bin/python
CONDA_ROOT=/home/akila-i/miniforge3
CONDA_SHLVL=1
CURL_CA_BUNDLE=<not set>
LD_PRELOAD=<not set>
PATH=/home/akila-i/miniforge3/bin:/home/akila-
i/miniforge3/condabin:/usr/bin/flutter/bin:/home/akila-
i/.nvm/versions/node/v22.0.0/bin:/home/akila-i/.console-ninja/.bin:/ho
me/akila-
i/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/
bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
WINDOWPATH=2
active environment : base
active env location : /home/akila-i/miniforge3
shell level : 1
user config file : /home/akila-i/.condarc
populated config files : /home/akila-i/miniforge3/.condarc
conda version : 24.3.0
conda-build version : not installed
python version : 3.10.14.final.0
solver : libmamba (default)
virtual packages : __archspec=1=icelake
__conda=24.3.0=0
__cuda=12.2=0
__glibc=2.39=0
__linux=6.8.0=0
__unix=0=0
base environment : /home/akila-i/miniforge3 (writable)
conda av data dir : /home/akila-i/miniforge3/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/pytorch/linux-64
https://conda.anaconda.org/pytorch/noarch
https://conda.anaconda.org/nvidia/linux-64
https://conda.anaconda.org/nvidia/noarch
https://conda.anaconda.org/iopath/linux-64
https://conda.anaconda.org/iopath/noarch
https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /home/akila-i/miniforge3/pkgs
/home/akila-i/.conda/pkgs
envs directories : /home/akila-i/miniforge3/envs
/home/akila-i/.conda/envs
platform : linux-64
user-agent : conda/24.3.0 requests/2.31.0 CPython/3.10.14 Linux/6.8.0-31-generic ubuntu/24.04 glibc/2.39 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8
UID:GID : 1000:1000
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.
Example: conda --no-plugins install <package>
Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.
Example: CONDA_NO_PLUGINS=true conda install <package>
我也尝试过重新安装 conda。但我无法解决这个问题。有人知道为什么会发生以及如何解决吗?
似乎您可以通过在运行脚本之前设置以下标志来禁用速度限制错误
export MAMBA_NO_LOW_SPEED_LIMIT=1