Join us in Silicon Valley September 18-19 at the 2024 PyTorch Conference. Learn more.
  • Learn
    Get Started

    Run PyTorch locally or get started quickly with one of the supported cloud platforms

    Tutorials

    Whats new in PyTorch tutorials

    Learn the Basics

    Familiarize yourself with PyTorch concepts and modules

    PyTorch Recipes

    Bite-size, ready-to-deploy PyTorch code examples

    Intro to PyTorch - YouTube Series

    Master PyTorch basics with our engaging YouTube tutorial series

  • Ecosystem
    Tools

    Learn about the tools and frameworks in the PyTorch Ecosystem

    Community

    Join the PyTorch developer community to contribute, learn, and get your questions answered.

    Forums

    A place to discuss PyTorch code, issues, install, research

    Developer Resources

    Find resources and get questions answered

    Contributor Awards - 2024

    Award winners announced at this year's PyTorch Conference

  • Edge
    About PyTorch Edge

    Build innovative and privacy-aware AI experiences for edge devices

    ExecuTorch

    End-to-end solution for enabling on-device inference capabilities across mobile and edge devices

  • Docs
    PyTorch

    Explore the documentation for comprehensive guidance on how to use PyTorch.

    PyTorch Domains

    Read the PyTorch Domains documentation to learn more about domain-specific libraries.

  • Blog & News
    PyTorch Blog

    Catch up on the latest technical news and happenings

    Community Blog

    Stories from the PyTorch ecosystem

    Videos

    Learn about the latest PyTorch tutorials, new, and more

    Community Stories

    Learn how our community solves real, everyday machine learning problems with PyTorch

    Events

    Find events, webinars, and podcasts

  • About
    PyTorch Foundation

    Learn more about the PyTorch Foundation.

    Governing Board Cloud Credit Program Technical Advisory Council Staff Contact Us
  • Become a Member
  • X

Featured Post

A Tour of PyTorch Internals (Part I)

The fundamental unit in PyTorch is the Tensor. This post will serve as an overview for how we imp...

Read More
  • Previous
  • Next

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.9 or later.

PyTorch Build
Your OS
Package
Language
Compute Platform
Run this Command:
PyTorch Build
Stable (1.13.0)
Preview (Nightly)
Your OS
Linux
Mac
Windows
Package
Conda
Pip
LibTorch
Source
Language
Python
C++ / Java
Compute Platform
CUDA 11.8
CUDA 12.1
CUDA 12.4
ROCm 5.2
CPU
Run this Command:
conda install pytorch torchvision -c pytorch

Previous versions of PyTorch

Quick Start With
Cloud Partners

Get up and running with PyTorch quickly through popular cloud platforms and machine learning services.

Amazon Web Services
  • PyTorch on AWS
  • Amazon SageMaker
  • AWS Deep Learning Containers
  • AWS Deep Learning AMIs
Google Cloud Platform
  • Cloud Deep Learning VM Image
  • Deep Learning Containers

Microsoft Azure

  • PyTorch on Azure
  • Azure Machine Learning
  • Azure Functions

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources

Stay in touch for updates, event info, and the latest news

By submitting this form, I consent to receive marketing emails from the LF and its projects regarding their events, training, research, developments, and related announcements. I understand that I can unsubscribe at any time using the links in the footers of the emails I receive. Privacy Policy.

PyTorch logo

© Copyright The Linux Foundation. The PyTorch Foundation is a project of The Linux Foundation. For web site terms of use, trademark policy and other policies applicable to The PyTorch Foundation please see Linux Foundation Policies. The PyTorch Foundation supports the PyTorch open source project, which has been established as PyTorch Project a Series of LF Projects, LLC. For policies applicable to the PyTorch Project a Series of LF Projects, LLC, please see LF Projects, LLC Policies. Privacy Policy and Terms of Use.

  • Learn
    • Get Started
    • Tutorials
    • Learn the Basics
    • PyTorch Recipes
    • Introduction to PyTorch - YouTube Series
  • Ecosystem
    • Tools
    • Community
    • Forums
    • Developer Resources
    • Contributor Awards - 2024
  • Edge
    • About PyTorch Edge
    • ExecuTorch
  • Docs
    • PyTorch
    • PyTorch Domains
  • Blog & News
    • PyTorch Blog
    • Community Blog
    • Videos
    • Community Stories
    • Events
  • About
    • PyTorch Foundation
    • Governing Board
    • Cloud Credit Program
    • Technical Advisory Council
    • Staff
    • Contact Us
  • Become a Member

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.