解决在anaconda中torch1.1.0下载过慢的问题Read timed out.

尝试了修改anaconda镜像源,完全按照网友的操作做完后,还是15KB/s左右的速度,龟速前进,最终Read timed out.
我一度以为是我网速的问题。。。结果让小伙伴帮我测试了一下,差不多都是10-30kb的亚子。。。
没用归没用,咱们还是乖乖先把镜像源修改了:
1、在终端输入:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu
Collecting torch==2.7.0 Downloading torch-2.7.0-cp313-cp313-win_amd64.whl.metadata (29 kB) Requirement already satisfied: filelock in d:\anaconda\lib\site-packages (from torch==2.7.0) (3.17.0) Requirement already satisfied: typing-extensions>=4.10.0 in d:\anaconda\lib\site-packages (from torch==2.7.0) (4.12.2) Requirement already satisfied: sympy>=1.13.3 in d:\anaconda\lib\site-packages (from torch==2.7.0) (1.13.3) Requirement already satisfied: networkx in d:\anaconda\lib\site-packages (from torch==2.7.0) (3.4.2) Requirement already satisfied: jinja2 in d:\anaconda\lib\site-packages (from torch==2.7.0) (3.1.6) Requirement already satisfied: fsspec in d:\anaconda\lib\site-packages (from torch==2.7.0) (2025.3.2) Requirement already satisfied: setuptools in d:\anaconda\lib\site-packages (from torch==2.7.0) (72.1.0) Requirement already satisfied: mpmath<1.4,>=1.1.0 in d:\anaconda\lib\site-packages (from sympy>=1.13.3->torch==2.7.0) (1.3.0) Requirement already satisfied: MarkupSafe>=2.0 in d:\anaconda\lib\site-packages (from jinja2->torch==2.7.0) (3.0.2) Downloading torch-2.7.0-cp313-cp313-win_amd64.whl (212.5 MB) 0.8/212.5 MB 19.5 kB/s eta 3:00:39 WARNING: Connection timed out while downloading. ERROR: Could not install packages due to an OSError: [WinError 32] ��һ����������ʹ�ô��ļ��������޷����ʡ�: 'C:\\Users\\gjs\\AppData\\Local\\Temp\\pip-unpack-p8_3m7yg\\torch-2.7.0-cp313-cp313-win_amd64.whl' Consider using the `--user` option or check the permissions.
06-29
(pytorch) C:\Users\29862>pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu126 Looking in indexes: https://download.pytorch.org/whl/cu126 Collecting torch Downloading https://download.pytorch.org/whl/cu126/torch-2.8.0%2Bcu126-cp313-cp313-win_amd64.whl.metadata (29 kB) Collecting torchvision Downloading https://download.pytorch.org/whl/cu126/torchvision-0.23.0%2Bcu126-cp313-cp313-win_amd64.whl.metadata (6.3 kB) Collecting filelock (from torch) Using cached https://download.pytorch.org/whl/filelock-3.13.1-py3-none-any.whl.metadata (2.8 kB) Collecting typing-extensions>=4.10.0 (from torch) Using cached https://download.pytorch.org/whl/typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB) Collecting sympy>=1.13.3 (from torch) Using cached https://download.pytorch.org/whl/sympy-1.13.3-py3-none-any.whl.metadata (12 kB) Collecting networkx (from torch) Using cached https://download.pytorch.org/whl/networkx-3.3-py3-none-any.whl.metadata (5.1 kB) Collecting jinja2 (from torch) Using cached https://download.pytorch.org/whl/Jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB) Collecting fsspec (from torch) Using cached https://download.pytorch.org/whl/fsspec-2024.6.1-py3-none-any.whl.metadata (11 kB) Requirement already satisfied: setuptools in c:\users\29862\miniconda3\envs\pytorch\lib\site-packages (from torch) (78.1.1) Collecting numpy (from torchvision) Downloading https://download.pytorch.org/whl/numpy-2.1.2-cp313-cp313-win_amd64.whl.metadata (59 kB) Collecting pillow!=8.3.*,>=5.3.0 (from torchvision) Downloading https://download.pytorch.org/whl/pillow-11.0.0-cp313-cp313-win_amd64.whl.metadata (9.3 kB) Collecting mpmath<1.4,>=1.1.0 (from sympy>=1.13.3->torch) Using cached https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB) Collecting MarkupSafe>=2.0 (from jinja2->torch) Downloading https://download.pytorch.org/whl/MarkupSafe-2.1.5.tar.gz (19 kB) Preparing metadata (setup.py) ... done Downloading https://download.pytorch.org/whl/cu126/torch-2.8.0%2Bcu126-cp313-cp313-win_amd64.whl (2915.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━ 2.6/2.9 GB 17.5 MB/s eta 0:00:17 WARNING: Connection timed out while downloading. WARNING: Attempting to resume incomplete download (2634.8 MB/2915.4 MB, attempt 1) Resuming download https://download.pytorch.org/whl/cu126/torch-2.8.0%2Bcu126-cp313-cp313-win_amd64.whl (2634.8 MB/2915.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 GB 21.2 MB/s 0:00:14 Downloading https://download.pytorch.org/whl/cu126/torchvision-0.23.0%2Bcu126-cp313-cp313-win_amd64.whl (6.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 19.1 MB/s 0:00:00 Downloading https://download.pytorch.org/whl/pillow-11.0.0-cp313-cp313-win_amd64.whl (2.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 17.6 MB/s 0:00:00 Using cached https://download.pytorch.org/whl/sympy-1.13.3-py3-none-any.whl (6.2 MB) Using cached https://download.pytorch.org/whl/typing_extensions-4.12.2-py3-none-any.whl (37 kB) Using cached https://download.pytorch.org/whl/filelock-3.13.1-py3-none-any.whl (11 kB) Using cached https://download.pytorch.org/whl/fsspec-2024.6.1-py3-none-any.whl (177 kB) Using cached https://download.pytorch.org/whl/Jinja2-3.1.4-py3-none-any.whl (133 kB) Using cached https://download.pytorch.org/whl/networkx-3.3-py3-none-any.whl (1.7 MB) Downloading https://download.pytorch.org/whl/numpy-2.1.2-cp313-cp313-win_amd64.whl (12.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.6/12.6 MB 20.1 MB/s 0:00:00 Building wheels for collected packages: MarkupSafe DEPRECATION: Building 'MarkupSafe' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'MarkupSafe'. Discussion can be found at https://github.com/pypa/pip/issues/6334 Building wheel for MarkupSafe (setup.py) ... done Created wheel for MarkupSafe: filename=markupsafe-2.1.5-cp313-cp313-win_amd64.whl size=17268 sha256=2a080256bcc19243ade52c3e1e7f2b2182071e3d4fb93679a1314e479d25991c Stored in directory: c:\users\29862\appdata\local\pip\cache\wheels\84\b6\28\95b8e298901ee19b488797095efb5fbed28637ed83215b13b1 Successfully built MarkupSafe Installing collected packages: mpmath, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, fsspec, filelock, jinja2, torch, torchvision Successfully installed MarkupSafe-2.1.5 filelock-3.13.1 fsspec-2024.6.1 jinja2-3.1.4 mpmath-1.3.0 networkx-3.3 numpy-2.1.2 pillow-11.0.0 sympy-1.13.3 torch-2.8.0+cu126 torchvision-0.23.0+cu126 typing-extensions-4.12.2 (pytorch) C:\Users\29862>torch --version 'torch' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
最新发布
09-07
D:\>pip install D:\Python\Tools\torch\torch-2.6.0+cu118-cp313-cp313-win_amd64.whl Processing d:\python\tools\torch\torch-2.6.0+cu118-cp313-cp313-win_amd64.whl Requirement already satisfied: filelock in d:\python\tools\python 3.13.2\lib\site-packages (from torch==2.6.0+cu118) (3.18.0) Requirement already satisfied: typing-extensions>=4.10.0 in d:\python\tools\python 3.13.2\lib\site-packages (from torch==2.6.0+cu118) (4.13.1) Requirement already satisfied: networkx in d:\python\tools\python 3.13.2\lib\site-packages (from torch==2.6.0+cu118) (3.4.2) Collecting jinja2 (from torch==2.6.0+cu118) Using cached jinja2-3.1.6-py3-none-any.whl.metadata (2.9 kB) Requirement already satisfied: fsspec in d:\python\tools\python 3.13.2\lib\site-packages (from torch==2.6.0+cu118) (2024.12.0) Requirement already satisfied: setuptools in d:\python\tools\python 3.13.2\lib\site-packages (from torch==2.6.0+cu118) (79.0.0) Collecting sympy==1.13.1 (from torch==2.6.0+cu118) Using cached sympy-1.13.1-py3-none-any.whl.metadata (12 kB) Collecting mpmath<1.4,>=1.1.0 (from sympy==1.13.1->torch==2.6.0+cu118) Using cached mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB) Collecting MarkupSafe>=2.0 (from jinja2->torch==2.6.0+cu118) Using cached MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl.metadata (4.1 kB) Downloading sympy-1.13.1-py3-none-any.whl (6.2 MB) ━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.3/6.2 MB ? eta -:--:-- WARNING: Connection timed out while downloading. ERROR: Could not install packages due to an OSError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\27368\\AppData\\Local\\Temp\\pip-unpack-uj92m8n3\\sympy-1.13.1-py3-none-any.whl' Consider using the `--user` option or check the permissions.
05-04
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值