How to install PyTorch on a Mac OS X

Tensors and Dynamic neural networks in Python with strong GPU acceleration.

Debarko De 🦁
Jan 22, 2017 · 2 min read

PyTorch was recently launched. This is a small article on how to install PyTorch on your system. It is available on anaconda the package manager.

Firstly you need to install Anaconda Package Manager for Mac. You can download the latest Anaconda package manager from Download the command line interface as it is lighter by around 60mb and it’s shows installation errors easier. Depending on the version you have on your system download the 2.7 or 3.x version. Run the following command to start installation

bash Anaconda2–

It will first as you to read the license and then will install at the default location of [/Users/<username>/anaconda2]. Which is generally fine. You may want to customise if required. The installation takes sometime, so go have some coffee around this time. At the end it will also add the command conda to the bash command list.

Once conda is installed you can start installing PyTorch in your system. Run the below command:

conda install pytorch torchvision -c soumith

Output will look something like this below…

PyTorch installation screen

The above screen can change with future releases. Since the software is freshly baked expect changes to happen frequently.

You can follow the below link to start building you next Deep Learning and Neural Networks project on a dynamically generated graph from PyTorch

Any doubts, drop a comment below.

Debarko De 🦁

Written by

Computer Science || Engg Manager @Practo, ex @hashcube || #AI, #MachineLearning, #NeuralNetworks, #Javascript || Certified Open Water Diver 🌊, Camera Love 📷

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade