Anaconda Installation Anaconda is a software package created to facilitate the use of Python. It contains more than 250 commonly used toolkits, multiple versions of Python interpreters, and powerful virtual environment management tools, so Anaconda is named the Python family bucket. Anaconda can make installation, operation and upgrade environment easier, so it is recommended to install and use it. Installation steps:
PyCharm Installation PyCharm is a powerful Python IDE with debugging, syntax highlighting, Project management, code jumping, smart prompts, version control and other functions. Installation steps:
CUDA and CuDNN installation (optional)
Change the pip source to the domestic mirror When using pip to install the Python toolkit, it is recommended to switch to a domestic mirror because the default source network speed is extremely slow. https://pypi.org/ Domestic mirror Alibaba Cloud https://mirrors.aliyun.com/pypi/simple/ University of Science and Technology of China https://pypi.mirrors.ustc.edu.cn/simple/ Douban (douban) https://pypi.douban.com/simple/ Tsinghua University https://pypi.tuna.tsinghua.edu.cn/simple/ Huazhong University of Science and Technology https://pypi.hustunique.com/ Temporary use <br /> Just add -i url after the installation command, such as: download pandas using Tsinghua mirror
PyTorch Installation 1. Download whl file (optional) Go to the PyTorch official website https://pytorch.org/, click GetStarted, select the corresponding version, select pip for package, you can see the latest version numbers of torch and torchvision appear below, as well as a URL https://download.pytorch.org/whl/torch_stable.html, copy the URL and enter, you can see the installation files of various versions of torch. This method is faster than directly executing the installation command. The file naming is regular, such as:
The version after cu is cuda, the version after torch is torch, the version after torchvision is torchvision, the version after cp is python, and the last one represents windows 64 bit. You can use the shortcut key ctrl+F to search for the latest version of torch and torchvision files (such as searching for cu101/torch-1.4.0), and then select the corresponding python version and platform to download the whl files of pytorch and torchvision. The python version must be consistent with the system. You can enter python in the command line to view the python version in the system. 2. Create a new project with PyCharm Create New Project→Pure Python→Name→Create import torch print("hello pytorch{}".format(torch.__version__)) print(torch.cuda.is_available()) 3. Create a Python virtual environment Click Terminal below → Enter conda create -n virtual environment name python=version number (such as conda create -n pytorch_gpu python=3.7) → Press Enter → Wait for completion Enter the virtual environment: Enter conda activate virtual environment name → press Enter 4. Installation Enter the directory where the whl file is located: Enter cd whl file directory → Enter Installation: Enter pip install torch → Press tab to complete automatically → Enter → Wait for successful installation Enter pip install torchvision → Press tab to complete automatically → Enter → Wait for successful installation Note: If you did not download the whl file in the first step, you can directly install it using pip or conda command. The installation command will be displayed after selecting the corresponding version on the PyTorch official website. 5. Associate the current project with the newly created virtual environment, that is, select the Python interpreter File→Setting→Project: Project name/Project Interpreter→Setting button→Add→Conda Environment→Existing environment→Select anaconda installation path/envs/virtual environment name/python.exe in interpreter→OK→OK→OK→OK→Wait a moment for initialization 6. Verification Right click to run and successfully output the PyTorch version. If the output is True, it proves that the GPU is available. Summarize This is the end of this article about the installation tutorial of the PyTorch development environment under Windows. For more relevant windows PyTorch environment installation content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
>>: react-beautiful-dnd implements component drag and drop function
Table of contents Preface 1. bat executes js 2. T...
This article will introduce how to use explain to...
1. Check and install pssh, yum list pssh 2. Becau...
What is "Sticky Footer" The so-called &...
Table of contents 1. What is JSON 1.1 Array liter...
Preface The file system is responsible for organi...
The <marquee> tag is a tag that appears in ...
1. Current date select DATE_SUB(curdate(),INTERVA...
Although the frequency of starting the shell is v...
1. CSS style solves the problem of displaying ell...
Table of contents 1. The magical extension operat...
In the SQL like statement, for example SELECT * F...
1. Add the viewport tag to the HTML header. At th...
1. Log in to VPN using IE browser 2. Remote login...
Table of contents Preliminary preparation Impleme...