{"id":5254,"date":"2025-04-04T07:21:54","date_gmt":"2025-04-04T07:21:54","guid":{"rendered":"https:\/\/www.talentelgia.com\/blog\/?p=5254"},"modified":"2025-04-04T07:29:27","modified_gmt":"2025-04-04T07:29:27","slug":"how-to-install-pytorch","status":"publish","type":"post","link":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/","title":{"rendered":"How to Install Pytorch?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#What_Is_PyTorch\" title=\"What Is PyTorch?\">What Is PyTorch?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#1_Installing_PyTorch_on_Windows\" title=\"1. Installing PyTorch on Windows\">1. Installing PyTorch on Windows<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#A_Installing_PyTorch_Using_Pip\" title=\"A. Installing PyTorch Using Pip\">A. Installing PyTorch Using Pip<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#B_Installing_PyTorch_Using_Conda\" title=\"B.&nbsp; Installing PyTorch Using Conda\">B.&nbsp; Installing PyTorch Using Conda<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#2_Installing_PyTorch_on_macOS\" title=\"2.&nbsp; Installing PyTorch on macOS\">2.&nbsp; Installing PyTorch on macOS<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#A_Installing_PyTorch_Using_PIP\" title=\"A. Installing PyTorch Using PIP\">A. Installing PyTorch Using PIP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#B_Installing_PyTorch_on_macOS_Using_Conda\" title=\"B. Installing PyTorch on macOS Using Conda\">B. Installing PyTorch on macOS Using Conda<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#3_Installing_PyTorch_for%E2%80%82Linux\" title=\"3. Installing PyTorch for\u2002Linux\">3. Installing PyTorch for\u2002Linux<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#A_Install_Pytorch_on_Linux_Using_PIP\" title=\"A. Install Pytorch on Linux Using PIP\">A. Install Pytorch on Linux Using PIP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#B_Install_Pytorch_using_CUDA_Support\" title=\"B.\u00a0Install Pytorch using CUDA Support\">B.\u00a0Install Pytorch using CUDA Support<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#Getting_Started_with_PyTorch_on_Google_Colab\" title=\"Getting Started with PyTorch on Google Colab\">Getting Started with PyTorch on Google Colab<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#What_is_Google_Colab\" title=\"What is Google Colab?\">What is Google Colab?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#Getting_Started_with_Google_Colab\" title=\"Getting Started with Google Colab\">Getting Started with Google Colab<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#A_Setting_Up_GPU_in_Google_Colab\" title=\"A. Setting Up GPU in Google Colab\">A. Setting Up GPU in Google Colab<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#B_Installing_PyTorch_On_Google_Collab\" title=\"B. Installing PyTorch On Google Collab\">B. Installing PyTorch On Google Collab<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#Lets_look_at_the_step-by-step_process_to_install_PyTorch_in_Google_Colab\" title=\"Let&#8217;s look at the step-by-step process to install PyTorch in Google Colab\">Let&#8217;s look at the step-by-step process to install PyTorch in Google Colab<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#Conclusion\" title=\"Conclusion\">Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>PyTorch is an open-source deep learning framework widely adopted by researchers, Data Scientists, and AI\u2002developers for creating and training machine learning models. It is preferred\u2002over other frameworks as it offers flexibility, dynamic computation graphs and is easy to use. But before jumping into deep learning projects,\u2002the first task is to install PyTorch properly.<\/p>\n\n\n\n<p>For a new\u2002user, setting up PyTorch may appear to pose challenges, but a little training for users does wonders in making this setup a breeze. In this guide, we will cover every step of the installation so you can have everything set up correctly and get started with\u2002PyTorch without any problems. Let&#8217;s get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Is_PyTorch\"><\/span><strong>What Is PyTorch?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>PyTorch is an open-source deep learning framework that combines the Torch <a href=\"https:\/\/www.talentelgia.com\/services\/machine-learning-development-services\" target=\"_blank\" rel=\"noreferrer noopener\">machine learning <\/a>library with a high-level API written in\u2002Python. Initially created by Facebook AI Research (now known as Meta) and later governed by the PyTorch Foundation, it is one of\u2002the dominant tools for designing and training neural networks. PyTorch is widely used\u2002in research and AI applications as it supports a variety of architectures, including linear regression and deep learning, CNNs, and transformer architectures.<\/p>\n\n\n\n<p>Flexibility and\u2002ease of use are one of the main strengths of PyTorch. This includes dynamic computation graphs that enable developers to\u2002change and test different parts of their code in real time without needing to wait for the complete execution. As such, PyTorch is incredibly useful for fast prototyping, debugging, and iterative\u2002research. Adding to this, its tight integration\u2002with Python, combined with a wide range of ready-to-use and pre-trained models, makes it a go-to framework for data scientists and AI researchers alike across the globe.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Installing_PyTorch_on_Windows\"><\/span><strong>1. Installing PyTorch on Windows<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To install PyTorch on a Windows operating system, follow the steps below.<\/p>\n\n\n\n<p><strong>Prerequisites<\/strong><\/p>\n\n\n\n<p>Before you install,\u2002make sure that you have the following requirements:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Python: <\/strong>Python should be available on the\u2002system.<\/li>\n\n\n\n<li><strong>Package Managers:<\/strong> You should have pip or conda\u2002installed for the installation process.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"A_Installing_PyTorch_Using_Pip\"><\/span><strong>A. Installing PyTorch Using Pip<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Step 1: Check if\u2002Python is installed<\/strong><\/p>\n\n\n\n<p>First, you have to make sure that Python is installed on your system. You can check it by running the following command in the command prompt:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-6388a6f09c3d245528609fd0849e7cb9\"><code>python -V<\/code><\/pre>\n\n\n\n<p>If Python is installed, you will see an output similar to:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-5dd6c23dbe79dda42f97b3c64450927d\"><code><strong>Output:\n<\/strong>Python 3.10.2&nbsp;<\/code><\/pre>\n\n\n\n<p><strong>Step 2: Verify Pip Installation<\/strong><\/p>\n\n\n\n<p>Next, check if pip,&nbsp; the Python package manager, is installed by running:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-db83a345de8b2ef3f1876bb6bf7f8de1\"><code>pip -V<\/code><\/pre>\n\n\n\n<p>If pip is installed, you will see an output like:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-6cc6746eef2feefda361faea9223a902\"><code>Pip 21.2.4<\/code><\/pre>\n\n\n\n<p>If pip is not installed, you may need to install or update it before proceeding.<\/p>\n\n\n\n<p><strong>Step 3: Install PyTorch for CPU<\/strong><\/p>\n\n\n\n<p>To install PyTorch for CPU usage, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-1bc1bebb9ef0effb7e689dcc3e33989f\"><code>pip3 install torch torchvision torchaudio<\/code><\/pre>\n\n\n\n<p>Once the installation is complete, PyTorch will be ready for use.<\/p>\n\n\n\n<p><strong>Step 4: Verify Installation<\/strong><\/p>\n\n\n\n<p>To confirm that PyTorch was installed successfully, check its version using:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-cc8d3bb21dc3240525fc2736e2913aff\"><code>pip3 show torch<\/code><\/pre>\n\n\n\n<p><strong>Pro Tip<\/strong>: In case you want to uninstall PyTorch, you can use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-4849da79568aebce0e7f76863e63ff97\"><code>pip uninstall torch<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"B_Installing_PyTorch_Using_Conda\"><\/span><strong>B.&nbsp; Installing PyTorch Using Conda<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>In case you want to use the conda package manager, follow the\u2002instructions below to install PyTorch in a Windows environment.<\/p>\n\n\n\n<p><strong>Prerequisites<\/strong><\/p>\n\n\n\n<p>Check\u2002the next steps before the installation:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Anaconda\/Miniconda Installed:<\/strong> If you do not already have\u2002Conda installed, download and install Anaconda or Miniconda.<\/li>\n\n\n\n<li><strong>Ensure Conda is Installed: <\/strong>Run\u2002the following command in Anaconda Command Prompt to make sure Conda is installed:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-c9b627dc3441134d9ba6e25c222d5b65\"><code>conda -V<\/code><\/pre>\n\n\n\n<p>If Conda is installed, you will see an output similar to:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-88f000e0c0c2849a76e0f23cca4c40d3\"><code>conda 4.14.0<\/code><\/pre>\n\n\n\n<p><strong><strong><em>Now that we have ensured that Conda is installed, let&#8217;s look at the step-by-step procedure to install PyTorch Using Conda:\u00a0<\/em><\/strong><\/strong><\/p>\n\n\n\n<p><strong>Step 1: Install PyTorch for CPU<\/strong><\/p>\n\n\n\n<p>To install PyTorch for CPU-only usage, run:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-43d6796fa8a3597ae845de3fa85f3dd1\"><code>conda install pytorch torchvision torchaudio cpuonly -c pytorch<\/code><\/pre>\n\n\n\n<p>This command will download and install the required PyTorch libraries.<\/p>\n\n\n\n<p><strong>Step 2: Verify Installation<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-36ce4f494028a142d79ae798297be280\"><code>conda list -f pytorch<\/code><\/pre>\n\n\n\n<p>If the installation was successful, you will see an output like:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-7a9664e39ad07aa66db2d0ca3acd6ca2\"><code># packages in environment at C:\\Users\\YourUsername\\anaconda3:\n# Name                      Version\npytorch                    1.12.1<\/code><\/pre>\n\n\n\n<p><strong>C.&nbsp; Installing PyTorch with\u2002CUDA support<\/strong><\/p>\n\n\n\n<p>If you\u2002have a compatible NVIDIA GPU and CUDA available, you can install a version of PyTorch with GPU acceleration by just changing the installation command:<\/p>\n\n\n\n<p><strong>For CUDA 11.3:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-6edc186d4311c7c798ba7e7dc9d0b47e\"><code>conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch<\/code><\/pre>\n\n\n\n<p><strong>For CUDA 11.6:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-18c7dbd5b99173f22fecf3638544604c\"><code>conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge<\/code><\/pre>\n\n\n\n<p>These commands install a version of PyTorch that is optimized for\u2002GPU computation, giving significant performance improvements for deep learning tasks.<\/p>\n\n\n\n<p>After installation, you\u2002can check the installation using:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-36ce4f494028a142d79ae798297be280\"><code>conda list -f pytorch<\/code><\/pre>\n\n\n\n<p>You have successfully installed PyTorch on your Windows system using Conda.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Installing_PyTorch_on_macOS\"><\/span><strong>2.&nbsp; Installing PyTorch on macOS<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Installing PyTorch on macOS requires very little\u2002configuration. PyTorch does not support CUDA natively under macOS,\u2002which means unless you install from source, it&#8217;ll fall back to using the CPU.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"A_Installing_PyTorch_Using_PIP\"><\/span><strong>A. Installing PyTorch Using PIP<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Prerequisites<\/strong><\/p>\n\n\n\n<p>Before installation, ensure:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Python is installed<\/strong>: You can check the installed version using:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-eabc1ca25000690ddaf9efc7bee631e3\"><code>python3 --version<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-947014cf1c2eec3d89e3904bbc3875a2\"><code><strong>Example output:\n<\/strong>Python 3.9.7<\/code><\/pre>\n\n\n\n<p><strong>pip (Python package manager) is installed<\/strong>: Check its version using:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-ba93b25a263e17d574f604a8e05736a0\"><code>pip3 --version<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-597c194a0c71dd1a043467a7c4d4bbce\"><code><strong>Example output:\n<\/strong>pip 22.2.2<\/code><\/pre>\n\n\n\n<p><strong><strong>Now that we have ensured that PIP is installed, let&#8217;s look at the step-by-step procedure to install PyTorch using PIP:\u00a0<\/strong><\/strong><\/p>\n\n\n\n<p><strong>Step 1: Install PyTorch<\/strong><\/p>\n\n\n\n<p>To install PyTorch for CPU, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-7d2c2322dcb8a510955cdb448f8f1ba0\"><code><strong>pip3 install torch torchvision torchaudio<\/strong><\/code><\/pre>\n\n\n\n<p>This will install PyTorch and its related libraries.<\/p>\n\n\n\n<p><strong>Step 2: Verify Installation<\/strong><\/p>\n\n\n\n<p>After installation, verify it using:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-cc8d3bb21dc3240525fc2736e2913aff\"><code>pip3 show torch<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-832921ada9ddbf47f59d2c5500d5f4d9\"><code><strong>Example output:\n<\/strong>Name: torch  \nVersion: 1.12.1  <\/code><\/pre>\n\n\n\n<p>If you see the installed version, PyTorch is successfully installed.<\/p>\n\n\n\n<p><strong>Pro Tip: <\/strong>In case you want to uninstall PyTorch, simply run:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-4849da79568aebce0e7f76863e63ff97\"><code>pip uninstall torch<\/code><\/pre>\n\n\n\n<p>Once completed, PyTorch will be removed from your system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"B_Installing_PyTorch_on_macOS_Using_Conda\"><\/span><strong>B. Installing PyTorch on macOS Using Conda<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Another method for installing PyTorch on\u2002macOS is through the use of the Conda package manager. This approach is another option for those\u2002who are working inside of virtual environments that are maintained by Anaconda.<\/p>\n\n\n\n<p><strong>Step 1: Activate Anaconda Prompt<\/strong><\/p>\n\n\n\n<p>Before installing PyTorch, activate the Anaconda prompt (if it&#8217;s not already active) using:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-83d88a6bc6aafdf33d3e4633eab1df3d\"><code>conda activate<\/code><\/pre>\n\n\n\n<p><strong>Step 2: Check Conda Version<\/strong><\/p>\n\n\n\n<p>Ensure that Conda is installed by checking its version:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-62bf10fb2a6bf79434c0a3a8ab02c98c\"><code>conda-- version<\/code><\/pre>\n\n\n\n<p>If Conda is not installed, you will need to install Anaconda or Miniconda before proceeding.<\/p>\n\n\n\n<p><strong>Step 3: Install PyTorch<\/strong><\/p>\n\n\n\n<p>Now, install PyTorch using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-9f118688a327abe15757cac096a0b28e\"><code>conda install pytorch torchvision torchaudio -c pytorch<\/code><\/pre>\n\n\n\n<p>This will install PyTorch along with its necessary dependencies.<\/p>\n\n\n\n<p><strong>Step 4: Verify Installation<\/strong><\/p>\n\n\n\n<p>Once the installation is complete, confirm the installed version of PyTorch using:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-36ce4f494028a142d79ae798297be280\"><code>conda list -f pytorch<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-0ac21448bd9e243d9c58af4d34272fdf\"><code>Example output:\n\n# packages in environment\n\npytorch &nbsp; 1.12.1 &nbsp; py3.9_0 &nbsp; pytorch<\/code><\/pre>\n\n\n\n<p>If you see PyTorch listed, the installation was successful.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Installing_PyTorch_for%E2%80%82Linux\"><\/span><strong>3. Installing PyTorch for\u2002Linux<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"A_Install_Pytorch_on_Linux_Using_PIP\"><\/span><strong>A. Install Pytorch on Linux Using PIP<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>We can install PyTorch on Linux using pip, which is the\u2002default package manager for Python. Make sure to meet\u2002the prerequisites before continuing.<\/p>\n\n\n\n<p><strong>Prerequisites<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Glibc Version:<\/strong> Ensure your system has Glibc v2.17 or higher.<br><\/li>\n\n\n\n<li><strong>Python Installed:<\/strong> PyTorch requires Python 3.6 or later.<br><\/li>\n\n\n\n<li><strong>Pip Installed: <\/strong>The package manager pip must be installed<\/li>\n<\/ul>\n\n\n\n<p><em>Now that PIP is installed, let&#8217;s explore the step-by-step procedure to install PyTorch using PIP.<\/em><\/p>\n\n\n\n<p><strong>Step 1: Check Python Version<\/strong><\/p>\n\n\n\n<p>First, verify that Python is installed by running:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-6388a6f09c3d245528609fd0849e7cb9\"><code>python -V<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-1cb19487680bb4f5a802d68d89479313\"><code><strong>Example output:\n<\/strong>Python 3.8.10<\/code><\/pre>\n\n\n\n<p><strong>Step 2: Check Pip Version<\/strong><\/p>\n\n\n\n<p>Ensure that <strong>pip<\/strong> is installed by checking its version:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-db83a345de8b2ef3f1876bb6bf7f8de1\"><code>pip -V<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>Example output:\n<\/strong>\npip 21.2.4 from \/usr\/lib\/python3\/dist-packages\/pip (python 3.8)<\/code><\/pre>\n\n\n\n<p><strong>Step 3: Install PyTorch (CPU Version)<\/strong><\/p>\n\n\n\n<p>To install PyTorch for <strong>CPU-only<\/strong> support, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-2357497d0183cf5ee3e0c2a9fe72f1fe\"><code>pip3 install torch torchvision torchaudio --extra-index-url https:\/\/download.pytorch.org\/whl\/cpu<\/code><\/pre>\n\n\n\n<p><strong>Step 4: Verify Installation<\/strong><\/p>\n\n\n\n<p>Once the installation is complete, confirm the installed version of PyTorch:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-cc8d3bb21dc3240525fc2736e2913aff\"><code>pip3 show torch<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-5256a32886be1c55682561b3d7355d1f\"><code><strong>Example output:\n<\/strong>\nName: torch\nVersion: 1.12.1<\/code><\/pre>\n\n\n\n<p><strong>Summary<\/strong>: Tensors and dynamic neural networks in Python with strong GPU acceleration<\/p>\n\n\n\n<p>If you see the correct version listed, PyTorch has been successfully installed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"B_Install_Pytorch_using_CUDA_Support\"><\/span><strong>B.\u00a0Install Pytorch using CUDA Support<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>For GPU acceleration using CUDA, install the corresponding CUDA version.<\/p>\n\n\n\n<p><strong>For CUDA 11.3, use:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-4ca02a076cfbb683afedf29e5b007335\"><code>pip3 install torch torchvision torchaudio --extra-index-url https:\/\/download.pytorch.org\/whl\/cu113<\/code><\/pre>\n\n\n\n<p><strong>For CUDA 11.6, use:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-d32fed8fc77e91593c52d8ee7b6ea822\"><code>pip3 install torch torchvision torchaudio --extra-index-url https:\/\/download.pytorch.org\/whl\/cu116<\/code><\/pre>\n\n\n\n<p>Pro Tip: If you need to remove PyTorch, simply run:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-4849da79568aebce0e7f76863e63ff97\"><code>pip uninstall torch<\/code><\/pre>\n\n\n\n<p>This will uninstall the currently installed version of PyTorch from your system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Getting_Started_with_PyTorch_on_Google_Colab\"><\/span><strong>Getting Started with PyTorch on Google Colab<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_Google_Colab\"><\/span><strong>What is Google Colab?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Google Colaboratory (Google Colab), a tool designed for machine learning and deep learning research,\u2002offers a free online Jupyter Notebook environment. It provides an interactive coding environment that enables users to write and run Python code in the cloud without any\u2002local setup requirements.<\/p>\n\n\n\n<p><strong>Key Features:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>No installation is <\/strong>required \u2013 it works directly in your browser.<\/li>\n\n\n\n<li><strong>Free GPU\/TPU access<\/strong> \u2013 Ideal for ML &amp; AI tasks.<\/li>\n\n\n\n<li>&nbsp;<strong>Cloud storage integration<\/strong> \u2013 Supports Google Drive.<\/li>\n\n\n\n<li>&nbsp;<strong>Collaborative<\/strong> \u2013 Share notebooks easily with others.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Getting_Started_with_Google_Colab\"><\/span><strong>Getting Started with Google Colab<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Follow these steps to start using Google Colab:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Open Google Colab<\/strong>:<br>\n<ul class=\"wp-block-list\">\n<li>Visit <strong>Google Colaboratory<\/strong><strong><br><\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Sign in<\/strong>:<br>\n<ul class=\"wp-block-list\">\n<li>Log in using your <strong>Google Account<\/strong>.<br><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Create a new Jupyter Notebook<\/strong>:<br>\n<ul class=\"wp-block-list\">\n<li>Click <strong>File \u2192 New notebook<\/strong> (Python 3).<br><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>Now, you are all set to use <strong>Google Colab<\/strong>!&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"A_Setting_Up_GPU_in_Google_Colab\"><\/span><strong>A. Setting Up GPU in Google Colab<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>By default, Colab runs on a <strong>CPU<\/strong>. To use a <strong>GPU<\/strong>, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Go to &#8220;Runtime&#8221; in the menu<\/strong>.<br><\/li>\n\n\n\n<li>Click on <strong>&#8220;Change runtime type&#8221;<\/strong>.<br><\/li>\n\n\n\n<li>Under <strong>&#8220;Hardware Accelerator&#8221;<\/strong>, select <strong>&#8220;GPU&#8221;<\/strong>.<br><\/li>\n\n\n\n<li>Click <strong>&#8220;Save&#8221;<\/strong>.<br><\/li>\n<\/ol>\n\n\n\n<p>&nbsp;<strong>Note:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Google Colab <strong>provides 12 hours<\/strong> of continuous runtime.<br><\/li>\n\n\n\n<li>If <strong>inactive for more than 1 hour<\/strong>, your session disconnects.<br><\/li>\n\n\n\n<li>After 12 hours, the system will reset all RAM, disk storage, and data.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"B_Installing_PyTorch_On_Google_Collab\"><\/span><strong>B. Installing PyTorch On Google Collab<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Lets_look_at_the_step-by-step_process_to_install_PyTorch_in_Google_Colab\"><\/span>Let&#8217;s look at the step-by-step process to install PyTorch in Google Colab<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Colab comes with PyTorch pre-installed, but if needed, install\/update it using:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-c8f8040f0e67b1cd26f5d5b5cc67308e\"><code>!pip install torch torchvision torchaudio<\/code><\/pre>\n\n\n\n<p>To check if PyTorch is installed correctly, run:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-5dae11c82d7c76e23aaae06e0398e9b0\"><code>import torch\nprint(torch.__version__)<\/code><\/pre>\n\n\n\n<p>If you are using GPU, verify it with:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-1214639821d92cf16866ee7dceacdc7b\"><code>print(torch.cuda.is_available())  # Should return True if GPU is active<\/code><\/pre>\n\n\n\n<p>That&#8217;s it! You&#8217;re now ready to use PyTorch on Google Colab!&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-verse\">PyTorch offers cross-platform support, with installation instructions available for Windows, macOS, and\u2002Linux. Available for installation through both pip and conda, meaning you can integrate it wherever you\u2002need it in your flow. Their PyTorch deep learning library is a popular framework that\u2002allows developers to easily create complex neural networks and train them on either local or cloud-based infrastructure.<br><br>With this guide to installation steps, you are ready to go with PyTorch\u2002with a properly configured CPU or CUDA with your configuration for Machine Learning. With PyTorch installed, you can now begin\u2002exploring the powerful features and capabilities of this deep learning framework for training models and AI research.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>PyTorch is an open-source deep learning framework widely adopted by researchers, Data Scientists, and AI\u2002developers for creating and training machine learning models. It is preferred\u2002over other frameworks as it offers flexibility, dynamic computation graphs and is easy to use. But before jumping into deep learning projects,\u2002the first task is to install PyTorch properly. For a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5259,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[18],"tags":[],"class_list":["post-5254","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install Pytorch?<\/title>\n<meta name=\"description\" content=\"Learn how to install PyTorch with step-by-step instructions for Windows, macOS, and Linux. Set up PyTorch easily using pip, conda, or source builds.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Pytorch?\" \/>\n<meta property=\"og:description\" content=\"Learn how to install PyTorch with step-by-step instructions for Windows, macOS, and Linux. Set up PyTorch easily using pip, conda, or source builds.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/\" \/>\n<meta property=\"og:site_name\" content=\"Talentelgia\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-04T07:21:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-04T07:29:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2025\/04\/How-to-install-PyTorch.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Advait Upadhyay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Advait Upadhyay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/\"},\"author\":{\"name\":\"Advait Upadhyay\",\"@id\":\"https:\/\/www.talentelgia.com\/blog\/#\/schema\/person\/6db713566abc30413982d157f2262bbc\"},\"headline\":\"How to Install Pytorch?\",\"datePublished\":\"2025-04-04T07:21:54+00:00\",\"dateModified\":\"2025-04-04T07:29:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/\"},\"wordCount\":1428,\"publisher\":{\"@id\":\"https:\/\/www.talentelgia.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2025\/04\/How-to-install-PyTorch.webp\",\"articleSection\":[\"Web Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/\",\"url\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/\",\"name\":\"How to Install Pytorch?\",\"isPartOf\":{\"@id\":\"https:\/\/www.talentelgia.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2025\/04\/How-to-install-PyTorch.webp\",\"datePublished\":\"2025-04-04T07:21:54+00:00\",\"dateModified\":\"2025-04-04T07:29:27+00:00\",\"description\":\"Learn how to install PyTorch with step-by-step instructions for Windows, macOS, and Linux. Set up PyTorch easily using pip, conda, or source builds.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#primaryimage\",\"url\":\"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2025\/04\/How-to-install-PyTorch.webp\",\"contentUrl\":\"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2025\/04\/How-to-install-PyTorch.webp\",\"width\":1920,\"height\":1080,\"caption\":\"How to install PyTorch\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.talentelgia.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Pytorch?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.talentelgia.com\/blog\/#website\",\"url\":\"https:\/\/www.talentelgia.com\/blog\/\",\"name\":\"Talentelgia\",\"description\":\"Latest Web &amp; Mobile Technologies, AI\/ML, and Blockchain Blogs\",\"publisher\":{\"@id\":\"https:\/\/www.talentelgia.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.talentelgia.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.talentelgia.com\/blog\/#organization\",\"name\":\"Talentelgia\",\"url\":\"https:\/\/www.talentelgia.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.talentelgia.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2024\/01\/talentelgia-logo.svg\",\"contentUrl\":\"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2024\/01\/talentelgia-logo.svg\",\"width\":159,\"height\":53,\"caption\":\"Talentelgia\"},\"image\":{\"@id\":\"https:\/\/www.talentelgia.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.talentelgia.com\/blog\/#\/schema\/person\/6db713566abc30413982d157f2262bbc\",\"name\":\"Advait Upadhyay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.talentelgia.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2024\/09\/advait-sir.webp\",\"contentUrl\":\"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2024\/09\/advait-sir.webp\",\"caption\":\"Advait Upadhyay\"},\"description\":\"Advait Upadhyay is a well-experienced IT professional with over 15 years of industry know-how. He is the co-founder of Talentelgia Technologies and has a real passion for tech, eagerly following the cutting edge of new tech products and discoveries, of which he is always ready to express in his blog. The main purpose of his approach is to show business owners and organizations how to develop custom IT solutions that are suitable for their particular business cases. Advait's focus on innovation is not just about motivating his team but also about positioning Talentelgia as a market-dominant provider of services like AI\/ML, web, app, and blockchain development. Advait is not only leading his company, but he also becomes an exemplar in the technology industry. He is the pioneer who is breaking the way to a new world.\",\"sameAs\":[\"https:\/\/www.talentelgia.com\/\",\"https:\/\/www.linkedin.com\/company\/talentelgia-technologies\",\"https:\/\/www.linkedin.com\/in\/advaitupadhyay\/\"],\"url\":\"https:\/\/www.talentelgia.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Pytorch?","description":"Learn how to install PyTorch with step-by-step instructions for Windows, macOS, and Linux. Set up PyTorch easily using pip, conda, or source builds.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Pytorch?","og_description":"Learn how to install PyTorch with step-by-step instructions for Windows, macOS, and Linux. Set up PyTorch easily using pip, conda, or source builds.","og_url":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/","og_site_name":"Talentelgia","article_published_time":"2025-04-04T07:21:54+00:00","article_modified_time":"2025-04-04T07:29:27+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2025\/04\/How-to-install-PyTorch.webp","type":"image\/webp"}],"author":"Advait Upadhyay","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Advait Upadhyay","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#article","isPartOf":{"@id":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/"},"author":{"name":"Advait Upadhyay","@id":"https:\/\/www.talentelgia.com\/blog\/#\/schema\/person\/6db713566abc30413982d157f2262bbc"},"headline":"How to Install Pytorch?","datePublished":"2025-04-04T07:21:54+00:00","dateModified":"2025-04-04T07:29:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/"},"wordCount":1428,"publisher":{"@id":"https:\/\/www.talentelgia.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#primaryimage"},"thumbnailUrl":"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2025\/04\/How-to-install-PyTorch.webp","articleSection":["Web Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/","url":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/","name":"How to Install Pytorch?","isPartOf":{"@id":"https:\/\/www.talentelgia.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#primaryimage"},"image":{"@id":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#primaryimage"},"thumbnailUrl":"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2025\/04\/How-to-install-PyTorch.webp","datePublished":"2025-04-04T07:21:54+00:00","dateModified":"2025-04-04T07:29:27+00:00","description":"Learn how to install PyTorch with step-by-step instructions for Windows, macOS, and Linux. Set up PyTorch easily using pip, conda, or source builds.","breadcrumb":{"@id":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#primaryimage","url":"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2025\/04\/How-to-install-PyTorch.webp","contentUrl":"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2025\/04\/How-to-install-PyTorch.webp","width":1920,"height":1080,"caption":"How to install PyTorch"},{"@type":"BreadcrumbList","@id":"https:\/\/www.talentelgia.com\/blog\/how-to-install-pytorch\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.talentelgia.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install Pytorch?"}]},{"@type":"WebSite","@id":"https:\/\/www.talentelgia.com\/blog\/#website","url":"https:\/\/www.talentelgia.com\/blog\/","name":"Talentelgia","description":"Latest Web &amp; Mobile Technologies, AI\/ML, and Blockchain Blogs","publisher":{"@id":"https:\/\/www.talentelgia.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.talentelgia.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.talentelgia.com\/blog\/#organization","name":"Talentelgia","url":"https:\/\/www.talentelgia.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.talentelgia.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2024\/01\/talentelgia-logo.svg","contentUrl":"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2024\/01\/talentelgia-logo.svg","width":159,"height":53,"caption":"Talentelgia"},"image":{"@id":"https:\/\/www.talentelgia.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.talentelgia.com\/blog\/#\/schema\/person\/6db713566abc30413982d157f2262bbc","name":"Advait Upadhyay","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.talentelgia.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2024\/09\/advait-sir.webp","contentUrl":"https:\/\/www.talentelgia.com\/blog\/wp-content\/uploads\/2024\/09\/advait-sir.webp","caption":"Advait Upadhyay"},"description":"Advait Upadhyay is a well-experienced IT professional with over 15 years of industry know-how. He is the co-founder of Talentelgia Technologies and has a real passion for tech, eagerly following the cutting edge of new tech products and discoveries, of which he is always ready to express in his blog. The main purpose of his approach is to show business owners and organizations how to develop custom IT solutions that are suitable for their particular business cases. Advait's focus on innovation is not just about motivating his team but also about positioning Talentelgia as a market-dominant provider of services like AI\/ML, web, app, and blockchain development. Advait is not only leading his company, but he also becomes an exemplar in the technology industry. He is the pioneer who is breaking the way to a new world.","sameAs":["https:\/\/www.talentelgia.com\/","https:\/\/www.linkedin.com\/company\/talentelgia-technologies","https:\/\/www.linkedin.com\/in\/advaitupadhyay\/"],"url":"https:\/\/www.talentelgia.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/posts\/5254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/comments?post=5254"}],"version-history":[{"count":21,"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/posts\/5254\/revisions"}],"predecessor-version":[{"id":5276,"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/posts\/5254\/revisions\/5276"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/media\/5259"}],"wp:attachment":[{"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/media?parent=5254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/categories?post=5254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.talentelgia.com\/blog\/wp-json\/wp\/v2\/tags?post=5254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}