pytorch下载E盘
时间: 2024-05-05 21:14:22 浏览: 148
根据提供的引用内容,有两种方法可以将PyTorch下载到E盘。
方法一:使用清华镜像源下载PyTorch[^2]
1. 打开命令行终端。
2. 输入以下命令,添加清华镜像源:
```shell
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
```
3. 输入以下命令,安装PyTorch到E盘:
```shell
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch --prefix E:\pytorch
```
方法二:手动下载PyTorch压缩包[^1]
1. 打开浏览器,访问链接https://download.pytorch.org/whl/torch_stable.html。
2. 根据你的需求选择合适的版本,并点击下载。
3. 将下载的压缩包移动到E盘。
相关问题
安装pytorch时候c盘越来越少
### 安装 PyTorch 过程中 C 盘空间不足解决方案
#### 修改默认安装路径
为了防止C盘空间被占满,可以修改Conda环境中包的默认存储位置到其他磁盘分区。创建新的环境时指定不同的目录:
```bash
conda create --prefix D:\myenvs\pytorch_env python=3.7 pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge
```
这会把整个环境及其依赖项都放置于D盘下的`myenvs/pytorch_env`文件夹里[^4]。
#### 调整临时文件夹设置
Windows系统的临时文件通常位于系统盘(C:)上,可以通过更改TEMP和TMP环境变量来改变这一行为。具体操作如下:
- 右键点击“此电脑”,选择属性;
- 高级系统设置 -> 环境变量;
- 编辑或新建名为`TEMP`和`TMP`的用户变量,将其值设为非系统盘上的某个路径,比如 `D:\Temp` 或者 `E:\tmp`;
完成上述调整后重启计算机使变动生效[^2]。
#### 清理不必要的旧版本软件
如果之前尝试过多次安装不同版本的Python解释器、IDE或者其他库,则可能会残留大量无用的数据占用硬盘资源。建议卸载不再使用的应用程序,并清理%AppData%\Local\Temp以及通过命令行工具删除孤立的pip缓存(`pip cache purge`)。
另外需要注意的是,在执行setup.py脚本的时候应该遵循现代最佳实践指南,即尽可能利用高级别的打包分发机制而不是直接调用setup.py来进行项目构建与发布工作,从而规避潜在的风险警告信息[^3]。
阅读全文
相关推荐
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![](https://img-home.csdnimg.cn/images/20250102104920.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)