国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

cannot import name ‘_compare_version‘ from ‘torchmetrics.utilities.imports‘

這篇具有很好參考價(jià)值的文章主要介紹了cannot import name ‘_compare_version‘ from ‘torchmetrics.utilities.imports‘。希望對大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

Traceback (most recent call last):
File “/scratch/AzureNfsServer_INPUT1/vc_data/users/willing/home/mQG/src/1_train.py”, line 14, in
import pytorch_lightning as pl
File “/home/aiscuser/.conda/envs/willing/lib/python3.9/site-packages/pytorch_lightning/init.py”, line 34, in
from pytorch_lightning.callbacks import Callback # noqa: E402
File “/home/aiscuser/.conda/envs/willing/lib/python3.9/site-packages/pytorch_lightning/callbacks/init.py”, line 25, in
from pytorch_lightning.callbacks.progress import ProgressBarBase, RichProgressBar, TQDMProgressBar
File “/home/aiscuser/.conda/envs/willing/lib/python3.9/site-packages/pytorch_lightning/callbacks/progress/init.py”, line 22, in
from pytorch_lightning.callbacks.progress.rich_progress import RichProgressBar # noqa: F401
File “/home/aiscuser/.conda/envs/willing/lib/python3.9/site-packages/pytorch_lightning/callbacks/progress/rich_progress.py”, line 20, in
from torchmetrics.utilities.imports import _compare_version
ImportError: cannot import name ‘_compare_version’ from ‘torchmetrics.utilities.imports’ (/home/aiscuser/.conda/envs/willing/lib/python3.9/site-packages/torchmetrics/utilities/imports.py)

There are a few possible reasons for this error:文章來源地址http://www.zghlxwxcb.cn/news/detail-794061.html

  • The version of torchmetrics installed is incompatible with the version of pytorch_lightning. According to the pytorch_lightning documentation, the minimum required version of torchmetrics is 0.4.1. You can check your installed version with pip show torchmetrics or conda list torchmetrics and upgrade it if necessary with pip install --upgrade torchmetrics or conda update torchmetrics.
  • The installation of torchmetrics or pytorch_lightning is corrupted or incomplete. You can try reinstalling them with pip install --force-reinstall torchmetrics pytorch_lightning or conda install --force-reinstall torchmetrics pytorch_lightning.

到了這里,關(guān)于cannot import name ‘_compare_version‘ from ‘torchmetrics.utilities.imports‘的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • ImportError: cannot import name ‘TouchActions‘ from ‘selenium.webdriver‘

    今天踩了一個(gè)坑: ? ? 需要使用selenium-wire抓取請求heads信息,直接用命令 pip install?selenium-wire安裝后,調(diào)試代碼一直報(bào)cannot import name \\\'TouchActions\\\' from \\\'selenium.webdriver\\\' 開發(fā)環(huán)境: selenium? 版本4.11.2 (用 pip show selenium? 查看版本) selenium-wire版本 2.5.2?(用 pip selenium-wire? 查看版

    2024年02月08日
    瀏覽(19)
  • ImportError: cannot import name ‘escape‘ from ‘jinja2‘

    ImportError: cannot import name ‘escape‘ from ‘jinja2‘

    使用flask時(shí),導(dǎo)入jinja2報(bào)錯(cuò)如下: 然后在必應(yīng)bing搜索現(xiàn)實(shí)jinja2版本應(yīng)該小于3.1.0 之后在所用環(huán)境查看jinja2版本為3.1.2,所以jinja2版本應(yīng)降到3.1.0一下,之后我把版本改為3.0.2。 但是導(dǎo)入發(fā)現(xiàn)依舊報(bào)錯(cuò),然后仔細(xì)看了下報(bào)錯(cuò)原因。發(fā)現(xiàn)所用的環(huán)境是AppData下的,于是又把系統(tǒng)的環(huán)境

    2024年02月16日
    瀏覽(29)
  • ImportError: cannot import name ‘InterpolationMode‘ from ‘torchvision.transforms‘

    這個(gè)原因是torchvision的版本太久了,這個(gè)InterpolationMode是新版本中的函數(shù), torchvision=0.2.2 torch=1.8.2 pip install torchvision==0.9.1 這個(gè)完全沒有任何副作用,升級更高版本的,可能會(huì)卸載你之前的torch,比較麻煩。

    2024年02月16日
    瀏覽(27)
  • Python錯(cuò)誤:ImportError: cannot import name “Mapping“ from “collections“

    場景描述: 使用Pycharm導(dǎo)入python模塊時(shí)觸發(fā)了ImportError,提示cannot import name \\\"Mapping\\\" from \\\"collections\\\",意思是無法從“集合”導(dǎo)入名稱“映射” 具體原因: 我下載的python解釋器版本是3.10,python3自3.10版本后對requests庫有進(jìn)行調(diào)整,collections中不能直接調(diào)用Mapping、MutableMapping 無法導(dǎo)

    2024年02月11日
    瀏覽(27)
  • ImportError: cannot import name ‘OrderedDict‘ from ‘typing‘的解決辦法

    ImportError: cannot import name ‘OrderedDict‘ from ‘typing‘的解決辦法

    環(huán)境是:pytorch:1.13.0 ? ? ? ? ? ? ? ?python :3.7.0 本來代碼只有一點(diǎn)導(dǎo)入下載數(shù)據(jù)集并做處理,準(zhǔn)備先運(yùn)行下載數(shù)據(jù)集時(shí),報(bào)了這個(gè)錯(cuò)誤。 ? ?查詢網(wǎng)上說的是python的版本有問題? 于是在anconda上更改這個(gè)環(huán)境的版本到python3.7.2 然后運(yùn)行再試著運(yùn)行代碼, 運(yùn)行成功! 總結(jié):

    2024年02月17日
    瀏覽(21)
  • Python報(bào)錯(cuò):ImportError: cannot import name ‘xxx‘ from ‘xxx‘

    Python報(bào)錯(cuò):ImportError: cannot import name ‘xxx‘ from ‘xxx‘

    python運(yùn)行.py文件時(shí)報(bào)錯(cuò):ImportError: cannot import name ‘xxx‘ from ‘xxx‘(無法從\\\'xxx\\\'中導(dǎo)入\\\'xxx\\\')該問題為xxx變量被二次定義(重名了) 如以下cannot importt \\\'Ship2\\\' form \\\'ship2\\\' ()的報(bào)錯(cuò),解決方案為:查看子函數(shù)ship2內(nèi)的定義是否存在一個(gè)變量在另外的子函數(shù)或者main主函數(shù)中已然被定

    2024年02月15日
    瀏覽(22)
  • ImportError: cannot import name ‘SQLDatabaseChain‘ from ‘langchain‘解決方案

    ImportError: cannot import name ‘SQLDatabaseChain‘ from ‘langchain‘解決方案

    ??大家好,我是愛編程的喵喵。雙985碩士畢業(yè),現(xiàn)擔(dān)任全棧工程師一職,熱衷于將數(shù)據(jù)思維應(yīng)用到工作與生活中。從事機(jī)器學(xué)習(xí)以及相關(guān)的前后端開發(fā)工作。曾在阿里云、科大訊飛、CCF等比賽獲得多次Top名次。現(xiàn)為CSDN博客專家、人工智能領(lǐng)域優(yōu)質(zhì)創(chuàng)作者。喜歡通過博客創(chuàng)作

    2024年02月10日
    瀏覽(24)
  • 解決 ImportError: cannot import name ‘contextfilter‘ from ‘jinja2‘

    升級 jupyterhub -i 就是選擇鏡像源,不然更新很慢。 如果是conda環(huán)境,運(yùn)行以下命令 國內(nèi)鏡像: 更新pip

    2024年02月12日
    瀏覽(35)
  • cannot import name Markup from jinja2解決方案

    cannot import name Markup from jinja2解決方案

    將代碼改一下,? 代碼如下:? 運(yùn)行結(jié)果:

    2024年02月11日
    瀏覽(30)
  • 已解決ImportError: cannot import name ‘DecisionBoundaryDisplay‘ from ‘sklearn.inspection‘

    已解決ImportError: cannot import name ‘DecisionBoundaryDisplay‘ from ‘sklearn.inspection‘

    已解決(from sklearn.inspection import DecisionBoundaryDisplay導(dǎo)包錯(cuò)誤)ImportError: cannot import name ‘DecisionBoundaryDisplay’ from ‘sklearn.inspection’ (F:softwareinstalledAnacondalibsite-packagessklearninspection_ init _.py)親測有效 一個(gè)小伙伴遇到問題跑來私信我,想用sklearn導(dǎo)入DecisionBoundaryDisplay,但是

    2024年02月04日
    瀏覽(43)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包