這期內(nèi)容當(dāng)中小編將會給大家?guī)碛嘘P(guān)如何在win10環(huán)境中安裝Pytorch,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
創(chuàng)新互聯(lián)公司專注于高港企業(yè)網(wǎng)站建設(shè),自適應(yīng)網(wǎng)站建設(shè),商城建設(shè)。高港網(wǎng)站建設(shè)公司,為高港等地區(qū)提供建站服務(wù)。全流程按需策劃,專業(yè)設(shè)計,全程項目跟蹤,創(chuàng)新互聯(lián)公司專業(yè)和態(tài)度為您提供的服務(wù)第一步:去官網(wǎng)看看
點擊get started
復(fù)制命令到win10終端:
C:\Users\Shu\Desktop>pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl Collecting torch==0.4.1 from http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl Downloading http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl (55.9MB) 100% |████████████████████████████████| 55.9MB 2.9MB/s Installing collected packages: torch Successfully installed torch-0.4.1
C:\Users\Shu\Desktop>pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl Collecting torch==0.4.1 from http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl Downloading http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl (55.9MB) 100% |████████████████████████████████| 55.9MB 2.9MB/s Installing collected packages: torch Successfully installed torch-0.4.1 C:\Users\Shu\Desktop>pip3 install torchvision Collecting torchvision Downloading https://files.pythonhosted.org/packages/ca/0d/f00b2885711e08bd71242ebe7b96561e6f6d01fdb4b9dcf4d37e2e13c5e1/torchvision-0.2.1-py2.py3-none-any.whl (54kB) 100% |████████████████████████████████| 61kB 120kB/s Requirement already satisfied: numpy in c:\users\shu\appdata\local\programs\python\python36\lib\site-packages (from torchvision) (1.15.3) Requirement already satisfied: six in c:\users\shu\appdata\local\programs\python\python36\lib\site-packages (from torchvision) (1.11.0) Collecting pillow>=4.1.1 (from torchvision) Downloading https://files.pythonhosted.org/packages/bd/39/c76eaf781343162bdb1cf4854cb3bd5947a87ee44363e5acd6c48d69c4a1/Pillow-5.3.0-cp36-cp36m-win_amd64.whl (1.6MB) 100% |████████████████████████████████| 1.6MB 81kB/s Requirement already satisfied: torch in c:\users\shu\appdata\local\programs\python\python36\lib\site-packages (from torchvision) (0.4.1) Installing collected packages: pillow, torchvision Successfully installed pillow-5.3.0 torchvision-0.2.1
談笑間,pytorch就已經(jīng)安裝成功了。我這邊開的熱點,網(wǎng)速可能會快一些。
注:現(xiàn)在網(wǎng)上的教程大多是Anaconda方式 安裝,誰讓小書是小白呢,代碼編輯器是sublime text 3,所以用的都是簡單粗暴的方法。
C:\Users\Shu\Desktop>python Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pytorch Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'pytorch' >>> import torch >>>
上述就是小編為大家分享的如何在win10環(huán)境中安裝Pytorch了,如果剛好有類似的疑惑,不妨參照上述分析進行理解。如果想知道更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。