#python #pytorch
#python #pytorch
Вопрос:
Я пытаюсь запустить run_placesCNN_basic.py код изhttps://github.com/CSAILVision/places365. Я использую Windows 10 и Python 3.7.9.
Я открываю командную строку и пытаюсь установить pytorch:
py -m pip install torch==1.6.0 cpu torchvision==0.7.0 cpu -f https://download.pytorch.org/whl/torch_stable.html
И я получаю следующий процесс:
C:Users..Downloadsplaces365-master>py -m pip install torch==1.6.0 cpu torchvision==0.7.0 cpu -f https://download.pytorch.org/whl/torch_stable.html
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Collecting torch==1.6.0 cpu
Downloading https://download.pytorch.org/whl/cpu/torch-1.6.0+cpu-cp37-cp37m-win_amd64.whl (167.7 MB)
|████████████████████████████████| 167.7 MB 1.8 kB/s
Collecting torchvision==0.7.0 cpu
Downloading https://download.pytorch.org/whl/cpu/torchvision-0.7.0+cpu-cp37-cp37m-win_amd64.whl (362 kB)
|████████████████████████████████| 362 kB 345 kB/s
Collecting numpy
Downloading numpy-1.19.1-cp37-cp37m-win_amd64.whl (12.9 MB)
|████████████████████████████████| 12.9 MB 63 kB/s
Collecting future
Downloading future-0.18.2.tar.gz (829 kB)
|████████████████████████████████| 829 kB 3.3 MB/s
Collecting pillow>=4.1.1
Downloading Pillow-7.2.0-cp37-cp37m-win_amd64.whl (2.1 MB)
|████████████████████████████████| 2.1 MB 42 kB/s
Using legacy setup.py install for future, since package 'wheel' is not installed.
Installing collected packages: numpy, future, torch, pillow, torchvision
WARNING: The script f2py.exe is installed in 'C:Users..AppDataLocalProgramsPythonPython37Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Running setup.py install for future ... done
WARNING: The scripts convert-caffe2-to-onnx.exe and convert-onnx-to-caffe2.exe are installed in 'C:Users..AppDataLocalProgramsPythonPython37Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed future-0.18.2 numpy-1.19.1 pillow-7.2.0 torch-1.6.0 cpu torchvision-0.7.0 cpu
WARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.
You should consider upgrading via the 'C:Users..AppDataLocalProgramsPythonPython37python.exe -m pip install --upgrade pip' command.
И, наконец, я пытаюсь запустить файл .py:
C:Users..Downloadsplaces365-master>py run_placesCNN_basic.py
Traceback (most recent call last):
File "run_placesCNN_basic.py", line 6, in <module>
import torch
File "C:Users..AppDataLocalProgramsPythonPython37libsite-packagestorch__init__.py", line 81, in <module>
ctypes.CDLL(dll)
File "C:Users..AppDataLocalProgramsPythonPython37libctypes__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
Кто-нибудь знает, почему я не могу запустить модуль pytorch, даже если он уже установлен?