

{"id":107203,"date":"2022-01-31T09:00:24","date_gmt":"2022-01-31T03:30:24","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=107203"},"modified":"2022-01-31T12:59:14","modified_gmt":"2022-01-31T07:29:14","slug":"pytorch-installation","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/","title":{"rendered":"PyTorch Installation in Easy Steps"},"content":{"rendered":"<p>PyTorch is a machine learning and deep learning framework that provides easy and efficient tools to tackle various complicated tasks. It can easily be downloaded from the official PyTorch website using conda or pip package managers.<\/p>\n<h3>Requirements for PyTorch Installation<\/h3>\n<p>Before installing PyTorch there are some requirements that need to be fulfilled to be able to download and use PyTorch.<\/p>\n<h4>a. Supported Operating Systems:<\/h4>\n<p>PyTorch is supported on Windows 7 or above, MacOS 10.10 or above and for Linux users Arch Linux (2012-07-15 or higher) , CentOS(7.3-1611 or above), Debian (8.0 or higher), Fedora (24 or higher), Mint (14 or higher), OpenSUSE (42.1 or higher), PCLinuxOS (2014.7 or higher), Slackware (14.2 or higher), Ubuntu (13.04 or higher) support PyTorch.<\/p>\n<h4>b. Python:<\/h4>\n<p>Python is pre-installed on Linux and there is no need to install any additional file. To install Python on Windows or MacOS, go to the <a href=\"https:\/\/www.python.org\/downloads\/\"><strong>official Python website<\/strong> <\/a>and download the latest version of Python and run the downloaded file to complete the process.<\/p>\n<p><strong>Note<\/strong>: If you do not want the latest version of Python you should download Python 3.6 or above as PyTorch is not supported by older versions.<\/p>\n<h4>c. Package Manager:<\/h4>\n<p>Either pip or conda is required for installing PyTorch. pip gets installed along with python and we are good to go. To install conda, go to the <a href=\"https:\/\/www.anaconda.com\/products\/individual\">official Anaconda website<\/a> and download the latest version in accordance with your Operating System. Though both pip and conda get the job done, conda is preferred as all the packages required to implement PyTorch are already installed along with Anaconda.<br \/>\nNote: There is no need to install Python if you have already installed Anaconda.<\/p>\n<h4>d. CUDA:(optional)<\/h4>\n<p>Computer Unified Device Architecture (CUDA) is an API (Application Programming Interface) and parallel computing platform that increases the speed of training our PyTorch models by 40-50%. However, this is an optional requirement and it\u2019s absence will seldom be noticed.<\/p>\n<h3>Steps for PyTorch installation<\/h3>\n<p><strong>1: <\/strong>Go to the <a href=\"https:\/\/pytorch.org\/get-started\/locally\/\">PyTorch official website<\/a>. Scroll to a table like the one shown below.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pic-pytorch-website.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-107415\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pic-pytorch-website.webp\" alt=\"pytorch-website\" width=\"1005\" height=\"395\" \/><\/a><\/p>\n<p><strong>2:<\/strong> Select the version you want to download.<\/p>\n<p><strong>3:<\/strong> Select your operating system &#8211; Linux\/Windows\/MacOS<\/p>\n<p><strong>4:<\/strong> Now we have to select the package manager for our installation. Conda is generally preferred over other package managers as it is convenient to use especially for beginners. If your coding language is C++ then choose Libtorch. And if you want to develop your projects on PyTorch core itself then choose \u2018Source\u2019 which is neither required nor recommended for beginners.<\/p>\n<p><strong>5:<\/strong> Select Language- select python if you choose conda, pip or source in the previous step otherwise select C++\/Java.<\/p>\n<p><strong>6:<\/strong> Now choose Compute platform, if you are windows or Linux user and have cuda installed in your system choose the appropriate version otherwise choose CPU. If you are a Mac user, cuda is not applicable, you can only choose CPU.<\/p>\n<p><strong>7:<\/strong> After you have chosen all the specifications you will see a command generated at the bottom of the table. Run this command on the terminal if you are a Linux or MacOS user. If you are a windows user run this command on the Anaconda prompt. In case you have chosen conda as your package manager and if you opted for pip then enter the command in \u2018command prompt\u2019.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pic-command.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-107414\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pic-command.webp\" alt=\"pic command\" width=\"1013\" height=\"378\" \/><\/a><\/p>\n<p><strong>8:<\/strong> Now the download will begin. Since the file being downloaded is quite hefty it will take some time to complete the download. While installing you may be asked yes\/no at one or more instants. Reply y in all these cases.<\/p>\n<h3>Testing the PyTorch Environment Setup<\/h3>\n<p>Now that our package is installed, it is a good practice to test if it is working properly by running a few commands. Search \u2018python\u2019 in the search bar of your system and open \u2018python shell\u2019 or any other code editor. Now we will import and run a command or two.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import torch\r\nvar=torch.zeros(5,9)\r\nprint(var)\r\n\r\ntensor([[0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n[0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n[0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n[0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n[0., 0., 0., 0., 0., 0., 0., 0., 0.]])<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pytorch-testing.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-107413\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pytorch-testing.webp\" alt=\"pytorch testing\" width=\"1070\" height=\"523\" \/><\/a><\/p>\n<p>Since our command is executed successfully and we get no error message we can be assured that PyTorch is installed and functioning properly.<\/p>\n<h3>Summary<\/h3>\n<p>Pytorch can be installed on any operating system from the official website in a few simple steps. The installation can be tested by importing the torch and running a few commands.<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:148,&quot;href&quot;:&quot;https:\\\/\\\/www.python.org\\\/downloads&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251205194542\\\/https:\\\/\\\/www.python.org\\\/downloads\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-06 12:20:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-10 11:23:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-13 16:31:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-17 03:30:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-20 19:51:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-24 03:02:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-27 05:22:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-30 07:25:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 17:56:07&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-06 01:59:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-09 08:55:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-12 11:40:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-15 16:59:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-19 06:47:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-22 09:03:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-25 09:10:42&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-29 05:13:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-01 06:29:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-04 06:53:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-07 07:44:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 08:55:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 01:23:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 10:44:42&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 16:20:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 17:40:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-27 13:09:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 14:22:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-05 22:46:42&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-09 06:21:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 07:35:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-15 23:03:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 04:17:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-22 06:22:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 06:45:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-29 15:13:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-01 16:22:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-05 14:00:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-09 02:56:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-12 15:35:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 00:53:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-19 05:57:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-22 06:25:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-26 06:37:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-29 08:44:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-02 13:20:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-05 15:36:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-09 07:21:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-12 09:04:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-15 11:00:40&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-18 11:37:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-21 12:06:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-25 05:54:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-28 06:21:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-31 08:57:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-03 09:18:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-07 17:04:01&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-10 21:11:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-14 09:56:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-17 12:56:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-20 19:27:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-24 08:40:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-27 09:18:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-30 11:33:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-03 16:52:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-07 05:46:19&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-07-07 05:46:19&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:293,&quot;href&quot;:&quot;https:\\\/\\\/www.anaconda.com\\\/products\\\/individual&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20220326063507\\\/https:\\\/\\\/www.anaconda.com\\\/products\\\/individual&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-08 00:00:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-12 14:20:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-26 15:40:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-12 04:25:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-20 19:03:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-31 03:57:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-08 08:40:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-25 09:48:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-04 06:02:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 07:10:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-31 12:30:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-04 15:20:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-09 06:01:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 20:46:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-18 12:52:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-22 23:01:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-30 17:31:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-05 11:37:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-10 00:56:54&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-14 02:13:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-28 05:16:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-16 08:11:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-19 19:32:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-24 23:27:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-30 00:53:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-04 22:28:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-08 06:45:00&quot;,&quot;http_code&quot;:503}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-07-08 06:45:00&quot;,&quot;http_code&quot;:503},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:294,&quot;href&quot;:&quot;https:\\\/\\\/pytorch.org\\\/get-started\\\/locally&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251207154019\\\/https:\\\/\\\/pytorch.org\\\/get-started\\\/locally\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-08 00:00:41&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-12 14:20:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-26 15:40:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-20 19:03:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-31 03:57:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-08 08:40:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-25 09:49:00&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-04 06:02:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 07:10:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-31 12:30:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-04 15:20:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-22 23:01:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-02 02:48:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-06 09:00:01&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-16 08:11:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-30 00:53:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-04 22:28:12&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-08 06:44:53&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-07-08 06:44:53&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PyTorch is a machine learning and deep learning framework that provides easy and efficient tools to tackle various complicated tasks. It can easily be downloaded from the official PyTorch website using conda or pip&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":107412,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26498],"tags":[26508,26509,26507],"class_list":["post-107203","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pytorch-tutorials","tag-install-pytorch","tag-pytorch-environment-setup","tag-pytorch-installation"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PyTorch Installation in Easy Steps - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn PyTorch Installation in easy steps using conda or pip package managers. Once it is installed, you can easily test the setup as shown.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/pytorch-installation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PyTorch Installation in Easy Steps - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn PyTorch Installation in easy steps using conda or pip package managers. Once it is installed, you can easily test the setup as shown.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/pytorch-installation\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-31T03:30:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-31T07:29:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pytorch-installation.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PyTorch Installation in Easy Steps - DataFlair","description":"Learn PyTorch Installation in easy steps using conda or pip package managers. Once it is installed, you can easily test the setup as shown.","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:\/\/data-flair.training\/blogs\/pytorch-installation\/","og_locale":"en_US","og_type":"article","og_title":"PyTorch Installation in Easy Steps - DataFlair","og_description":"Learn PyTorch Installation in easy steps using conda or pip package managers. Once it is installed, you can easily test the setup as shown.","og_url":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2022-01-31T03:30:24+00:00","article_modified_time":"2022-01-31T07:29:14+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pytorch-installation.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"PyTorch Installation in Easy Steps","datePublished":"2022-01-31T03:30:24+00:00","dateModified":"2022-01-31T07:29:14+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/"},"wordCount":688,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pytorch-installation.webp","keywords":["install Pytorch","PyTorch Environment Setup","PyTorch Installation"],"articleSection":["PyTorch Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/pytorch-installation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/","url":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/","name":"PyTorch Installation in Easy Steps - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pytorch-installation.webp","datePublished":"2022-01-31T03:30:24+00:00","dateModified":"2022-01-31T07:29:14+00:00","description":"Learn PyTorch Installation in easy steps using conda or pip package managers. Once it is installed, you can easily test the setup as shown.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/pytorch-installation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pytorch-installation.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/01\/pytorch-installation.webp","width":1200,"height":628,"caption":"pytorch installation"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/pytorch-installation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"PyTorch Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/pytorch-tutorials\/"},{"@type":"ListItem","position":3,"name":"PyTorch Installation in Easy Steps"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/107203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=107203"}],"version-history":[{"count":3,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/107203\/revisions"}],"predecessor-version":[{"id":107416,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/107203\/revisions\/107416"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/107412"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=107203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=107203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=107203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}