ImportError: No module named torchvision
轉自:https://blog.csdn.net/miao0967020148/article/details/80400536
torchvison:圖片、視訊資料和深度學習模型
解決方案
安裝torchvision,參照官網
pip install torchvision
安裝指定版本
pip install torchvision==0.1.8
Collecting torchvision
Downloading https://files.pythonhosted.org/packages/ca/0d/f00b2885711e08bd71242ebe7b96561e6f6d01fdb4b9dcf4d37e2e13c5e1/torchvision-0.2.1-py2.py3-none-any.whl (54kB)
100% |████████████████████████████████| 61kB 68kB/s
Collecting pillow>=4.1.1 (from torchvision)
Using cached https://files.pythonhosted.org/packages/00/49/a0483e7308b4b04b5a898789911dbb876d9fea54e7df0453915e47744cfd/Pillow-5.1.0-cp27-cp27mu-manylinux1_x86_64.whl
Requirement already satisfied: torch in /home/miao/deep_ocr_env/lib/python2.7/site-packages (from torchvision) (0.3.0.post4)
Requirement already satisfied: six in /home/miao/deep_ocr_env/lib/python2.7/site-packages (from torchvision) (1.11.0)
Requirement already satisfied: numpy in /home/miao/deep_ocr_env/lib/python2.7/site-packages (from torchvision) (1.12.1)
Requirement already satisfied: pyyaml in /home/miao/deep_ocr_env/lib/python2.7/site-packages (from torch->torchvision) (3.12)
Installing collected packages: pillow, torchvision
Found existing installation: Pillow 4.1.0
Uninstalling Pillow-4.1.0:
Successfully uninstalled Pillow-4.1.0
Successfully installed pillow-5.1.0 torchvision-0.2.1
相關文章
- ImportError: No module named `defusedxml`ImportErrorXML
- ImportError: No module named ‘torch‘ 解決方法ImportError
- 啟動uwsgi報錯ImportError: No module named, unable to load appImportErrorAPP
- pyecharts安裝後import錯誤 ImportError: No module named 'pyecharts_snapshot'EchartsImportError
- pycharm環境,命令列執行提示:ImportError: No module named xxx 解決方法PyCharm命令列ImportError
- ImportError: No module named flask 導包失敗,Python3 重新安裝 Flask 模組ImportErrorFlaskPython
- ModuleNotFoundError: No module named 'pyttsx'ErrorTTS
- Bug: No module named ‘pytest‘
- linux已經安裝bert4keras但出現ImportError: No module named ‘bert4keras‘LinuxKerasImportError
- ModuleNotFoundError: No module named ‘Crypto‘ ‘Cryptodome‘Error
- ModuleNotFoundError: No module named 'phkit.pinyin'Error
- No module named MYSQLdb 問題解決MySql
- Linux:Python報錯:No module named MySQLdbLinuxPythonMySql
- ModuleNotFoundError: No module named ‘DBUtils‘解決辦法Error
- 使用PyCharm時顯示的 No module named ‘xxx’PyCharm
- python ModuleNotFoundError: No module named ‘requests‘ 的 解決方案PythonError
- ModuleNotFoundError: No module named ‘cv2’——(版本問題)Error
- ImportError: cannot import name 'get_ora_doc' from partially initialized moduleImportErrorZed
- yum依賴python2環境-"No module named urlgrabber"Python
- 問題結局辦法:Error loading psycopg2 module: No module named ‘psycopg2‘Error
- ModuleNotFoundError: No module named ‘matplotlib‘ 一系列解決辦法Error
- 解決Python找不到ssl模組問題 No module named _sslPython
- 解決:ModuleNotFoundError: No module named ‘urllib3.packages.six.moves問題ErrorPackage
- 使用Pycharm出現No module named Test_01_module_a less... (Ctrl+F1) This inspection detects names that shPyCharm
- catkin_make出現 No module named 'catkin_pkg'(親測穩過)
- centos 解決python3.7 安裝時No module named _ssl 親測有效CentOSPython
- 記錄安裝conda install Python庫時報No module named ‘tensorflow‘錯誤Python
- RuntimeError: No such operator torchvision::nmsError
- centos安裝Python外掛後找不到對應的外掛ModuleNotFoundError: No module named*CentOSPythonError
- pip成功安裝gdal的whl檔案後,PyCharm仍報錯No module named ‘osgeo’PyCharm
- pip install了之後還是顯示no module named xxx的解決辦法
- Ubuntu20.04安裝LabelImg 以及出現(ModuleNotFoundError: No module named libs.resources)錯誤UbuntuError
- Python3出現"No module named 'MySQLdb'"問題-以及使用PyMySQL連線資料庫PythonMySql資料庫
- 解決已安裝opencv但仍提示報錯“no module named cv2“問題OpenCV
- ImportError: cannot import name parseImportError
- 查詢torch和torchvision對應版本
- 使用新版flask-script時報錯No module named flask._compat和cannot import name ‘_request_ctx_stack‘ from ‘flask‘FlaskImport
- module hmrclient is not a registered callable moduleclient