INSTALLING PREVIOUS VERSIONS OF PYTORCH

这篇博客详细列出了PyTorch从v1.0.0到v1.7.1各个版本的安装命令,包括Conda、OSX、Linux和Windows平台的Wheel安装方式。还提供了低于v1.0.0版本的安装教程,包括通过conda、源码编译和pip安装的步骤,以及针对不同CUDA版本的支持。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

COMMANDS FOR VERSIONS >= 1.0.0

v1.7.1

Conda

OSX

# conda
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 -c pytorch

Linux and Windows

# CUDA 9.2
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=9.2 -c pytorch

# CUDA 10.1
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch

# CUDA 10.2
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.2 -c pytorch

# CUDA 11.0
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch

# CPU Only
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cpuonly -c pytorch
<
### PyTorch on Linux Installation and Usage Guide #### Prerequisites for Installing PyTorch on a Linux Server To install PyTorch on a Linux server, it is important to ensure that the environment meets specific prerequisites. The server should have Python installed with its executable placed under `/usr/local/bin/` while dependencies are stored within `/usr/local/lib/python3.6/`, as per standard configurations[^2]. Additionally, having an appropriate NVIDIA driver along with compatible CUDA versions ensures optimal performance when running GPU-accelerated operations. For instance, if using an NVIDIA driver version `470.63.01` supporting up to CUDA 11.4, selecting a corresponding PyTorch build from previous releases becomes necessary since newer builds might not support older CUDA versions[^3]. #### Steps Involved in Setting Up PyTorch Environment Using Docker Containers An alternative method involves setting up through pre-configured Docker images which encapsulate both TensorFlow and PyTorch environments alongside other required libraries. Running containers provides isolation benefits reducing potential conflicts between different software packages or library versions present across multiple projects hosted on one machine. A command like below can be used to start such a container: ```bash docker run --gpus all -it --name my_torch -v $(pwd):/app easonbob/my_torch1-pytorch:22.03-py3 ``` This line initializes a new session named 'my_torch', mounting current directory into '/app' inside the image tagged as 'easonbob/my_torch1-pytorch:22.03-py3'. It also allocates access to available GPUs ensuring hardware acceleration capabilities remain intact during execution[^4]. #### Official Resources Available Directly From PyTorch Website The official website offers comprehensive guides covering various aspects related to installing and utilizing PyTorch effectively including system requirements, detailed instructions tailored towards diverse operating systems (including Linux), troubleshooting tips among others. Visiting pages dedicated specifically toward past iterations could prove beneficial especially when dealing with legacy setups requiring compatibility considerations.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

都市朝阳

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值