Anaconda3 安装pytorch出错:
conda install pytorch 1 Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): | - failed
解决办法:
conda config --add channels conda-forge
conda config --set channel_priority strict
conda config --set channel_priority flexible
直接我还用了
conda clean -a
conda clean -p
安装conda install pytorch
conda install pytorch Collecting package metadata (current_repodata.json): done Solving environment: done ## Package Plan ## environment location: /home/nication/anaconda3 added / updated specs: - pytorch The following packages will be downloaded: package | build ---------------------------|----------------- conda-4.11.0 | py39hf3d152e_0 16.8 MB conda-forge libblas-3.9.0 | 12_linux64_mkl 12 KB conda-forge libprotobuf-3.16.0 | h780b84a_0 2.5 MB conda-forge ninja-1.10.2 | h4bd325d_0 2.4 MB conda-forge python_abi-3.9 | 2_cp39 4 KB conda-forge pytorch-1.9.0 |cpu_py39h818de69_2 45.1 MB conda-forge sleef-3.5.1 | h7f98852_1 1.5 MB conda-forge ------------------------------------------------------------ Total: 68.4 MB The following NEW packages will be INSTALLED: libblas conda-forge/linux-64::libblas-3.9.0-12_linux64_mkl libprotobuf conda-forge/linux-64::libprotobuf-3.16.0-h780b84a_0 ninja conda-forge/linux-64::ninja-1.10.2-h4bd325d_0 python_abi conda-forge/linux-64::python_abi-3.9-2_cp39 pytorch conda-forge/linux-64::pytorch-1.9.0-cpu_py39h818de69_2 sleef conda-forge/linux-64::sleef-3.5.1-h7f98852_1 The following packages will be UPDATED: conda pkgs/main::conda-4.10.3-py39h06a4308_0 --> conda-forge::conda-4.11.0-py39hf3d152e_0 Proceed ([y]/n)? y Downloading and Extracting Packages sleef-3.5.1 | 1.5 MB | ################################# | 100% ninja-1.10.2 | 2.4 MB | ################################# | 100% pytorch-1.9.0 | 45.1 MB | #######1 | 22% pytorch-1.9.0 | 45.1 MB | #######1 | 22% libprotobuf-3.16.0 | 2.5 MB | ################################# | 100% python_abi-3.9 | 4 KB | ################################# | 100% conda-4.11.0 | 16.8 MB | ################################# | 100% libblas-3.9.0 | 12 KB | ################################# | 100%
OK