python-pytorchHow do I install Python and PyTorch on Windows?
- Download and install the latest version of Python 3 from the Python website.
- Open the command prompt and type
pip install torch
to install PyTorch. - To check the installation, type
python
in the command prompt and you should see something like this:
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
- Type
import torch
and you should see something like this:
>>> import torch
>>>
- To check the version of PyTorch, type
print(torch.__version__)
and you should see something like this:
>>> print(torch.__version__)
1.2.0
>>>
- To check the available packages in PyTorch, type
print(torch.utils.package_dir)
and you should see something like this:
>>> print(torch.utils.package_dir)
C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\torch
>>>
- You have successfully installed Python and PyTorch on Windows.
Helpful links
More of Python Pytorch
- How can I use PyTorch with Python 3.10?
- How do I install a Python PyTorch .whl file?
- How do I install PyTorch on a Windows computer?
- How can I use Python PyTorch without CUDA?
- How do I check the version of Python and PyTorch I am using?
- How can I compare the performance of PyTorch Python and C++ for software development?
- How can I use Python and PyTorch together with Xorg?
- How do I uninstall Python PyTorch?
- How do Python and PyTorch compare for software development?
- How do I download Python and Pytorch?
See more codes...