BlockingIOError:[Errno 11]安装 conda pytorch 软件包时资源暂时不可用

问题描述 投票:0回答:1

我尝试在新的 conda 环境中安装 pytorch。 所以我做了

conda create --name nemo_venv python=3.8
conda activate nemo_venv
。 然后我就这么做了
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia


现在我有了这个:

done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/cli/main.py", line 78, in main_subshell
        exit_code = do_call(args, parser)
                    ^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/cli/conda_argparse.py", line 166, in do_call
        result = getattr(module, func_name)(args, parser)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/notices/core.py", line 124, in wrapper
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/cli/main_install.py", line 26, in execute
        install(args, parser, "install")
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/cli/install.py", line 320, in install
        unlink_link_transaction = solver.solve_for_transaction(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/solve.py", line 139, in solve_for_transaction
        unlink_precs, link_precs = self.solve_for_diff(
                                   ^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/solve.py", line 200, in solve_for_diff
        final_precs = self.solve_final_state(
                      ^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/solve.py", line 345, in solve_final_state
        ssc = self._collect_all_metadata(ssc)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/common/io.py", line 85, in decorated
        return f(*args, **kwds)
               ^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/solve.py", line 565, in _collect_all_metadata
        index, r = self._prepare(prepared_specs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/solve.py", line 1280, in _prepare
        reduced_index = get_reduced_index(
                        ^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/index.py", line 267, in get_reduced_index
        new_records = SubdirData.query_all(
                      ^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/subdir_data.py", line 165, in query_all
        result = tuple(
                 ^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/concurrent/futures/_base.py", line 619, in result_iterator
        yield _result_or_cancel(fs.pop())
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/concurrent/futures/_base.py", line 317, in _result_or_cancel
        return fut.result(timeout)
               ^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/concurrent/futures/_base.py", line 456, in result
        return self.__get_result()
               ^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
        raise self._exception
      File "/root/sdb/anaconda3/lib/python3.11/concurrent/futures/thread.py", line 58, in run
        result = self.fn(*self.args, **self.kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/subdir_data.py", line 150, in subdir_query
        return tuple(
               ^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/subdir_data.py", line 172, in query
        self.load()
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/subdir_data.py", line 272, in load
        _internal_state = self._load()
                          ^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/core/subdir_data.py", line 315, in _load
        repodata, state = fetcher.fetch_latest_parsed()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/gateways/repodata/__init__.py", line 716, in fetch_latest_parsed
        parsed, state = self.fetch_latest()
                        ^^^^^^^^^^^^^^^^^^^
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/gateways/repodata/__init__.py", line 768, in fetch_latest
        cache.load_state()
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/gateways/repodata/__init__.py", line 581, in load_state
        self.load(state_only=True)
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/gateways/repodata/__init__.py", line 528, in load
        with self.cache_path_state.open("r+") as state_file, lock(state_file):
      File "/root/sdb/anaconda3/lib/python3.11/site-packages/conda/gateways/repodata/lock.py", line 59, in __enter__
        fcntl.lockf(
    BlockingIOError: [Errno 11] Resource temporarily unavailable

`$ /root/sdb/anaconda3/bin/conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia`




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>

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 successful.

我删除了旧的虚拟环境并创建了新的虚拟环境,但没有任何改变。

不知道是conda问题,pytorch问题还是python版本问题。

我什至尝试重新安装 conda,但没有任何改变。

此消息是否可能以某种方式与当前错误相关:

Collecting package metadata (current_repodata.json): \ WARNING conda.models.version:get_matcher(556): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1.*, but conda is ignoring the .* and treating it as 1.7.1
done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.

UPD. 我尝试分别安装 pytorch、torchvision 和 torchaudio,并且 pytorch 和 torchvision 安装正确,但 torchaduio 抛出错误: BlockingIOError:[Errno 11]资源暂时不可用

UPD 2.我通过

conda install torchaudio -c pytorch
安装torchaudio。但
pytorch-cuda=11.8
得到相同的:

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>

If submitted, this report will be used by core maintainers to improve
future releases of conda.

UPD 3. 即使简单的

conda search
命令也会引发相同的错误。

pytorch conda nvidia
1个回答
0
投票

我在尝试安装软件包时也遇到了类似的问题。这似乎解决了它:

conda clean -a
© www.soinside.com 2019 - 2024. All rights reserved.