Get Started
Choose your path: install PyTorch locally or launch instantly on supported cloud platforms
PyTorch 2.4
PyTorch 2.4 adds Python 3.12 support for torch.compile, FSDP2, custom ops API, and optimizations for AWS Graviton and GenAI workloads on CPUs.
Membership Available
Become an integral part of the PyTorch Foundation, to build and shape the future of AI.
Key Features &
Capabilities
See all Features
Production Ready
Transition seamlessly between eager and graph modes with TorchScript, and accelerate the path to production with TorchServe.
Distributed Training
Scalable distributed training and performance optimization in research and production is enabled by the torch.distributed backend.
Robust Ecosystem
A rich ecosystem of tools and libraries extends PyTorch and supports development in computer vision, NLP and more.
Cloud Support
PyTorch is well supported on major cloud platforms, providing frictionless development and easy scaling.
Install PyTorch
Select your preferences and run the install command. Stable represents the most currently tested and supported version of PyTorch. This should be suitable for many users. Preview is available if you want the latest, not fully tested and supported, builds that are generated nightly. Please ensure that you have met the prerequisites below (e.g., numpy), depending on your package manager. Anaconda is our recommended package manager since it installs all dependencies. You can also install previous versions of PyTorch. Note that LibTorch is only available for C .
NOTE: Latest PyTorch requires Python 3.8 or later.
Previous versions of PyTorch
Explore a rich ecosystem of libraries, tools, and more to support development.
Community
Join the PyTorch developer community to contribute, learn, and get your questions answered.