PracticePyTorch

Installing PyTorch

PyTorch is another great platform (along with TensorFlow) for creating machine learning solutions. The process of installing it is relatively straightforward:

Step 1: Make sure you have Anaconda installed. If not, go to: Installing Anaconda

Step 2: Install PyTorch: Initiate the Anaconda prompt (search for “Anaconda”, you should see the program as well as “Anaconda Prompt”). If you don’t see the prompt, then you can go to Anaconda Navigator, and from within it go to “Environments”, right click on the play-button and initiate terminal. I recommend creating a new environment PyTorch. You can do this by running the command:

conda create –name {env_name, for example: pytorch_env}

Step 3: Activate the environment that you created. You can do this by: conda activate pytorch_env (if you named it that). After activating the environment, follow the instructions here in order to generate the appropriate installation code and to apply it.

That’s it! Now you have an environment ‘pytorch_env’ (or whatever you named it) installed within Anaconda. You can see it by opening the Anaconda program and changing the environment to ‘pytorch_env’. Then install JupyterLab in this environment, and open JupyterLab.

Leave a Reply

Your email address will not be published. Required fields are marked *