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

解決:TypeError: Descriptors cannot not be created directly

這篇具有很好參考價(jià)值的文章主要介紹了解決:TypeError: Descriptors cannot not be created directly。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

我使用pip命令下載安裝paddlepaddle庫,具體命令如下所示,采用清華鏡像源,這樣下載速度更快!

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple paddlepaddle

安裝完成后,我來在python文件中導(dǎo)入飛漿,輸出其版本號(hào),具體如下所示:

import paddle
print(paddle.__version__)

但是,PyCharm卻報(bào)錯(cuò),具體報(bào)錯(cuò)信息如下所示:

TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

其實(shí),仔細(xì)閱讀報(bào)錯(cuò)信息就會(huì)發(fā)現(xiàn),報(bào)錯(cuò)的主要原因是因?yàn)閜rotobuf的版本太高而導(dǎo)致編譯錯(cuò)誤,所以我們只需要按照編譯器提示的信息下載3.19.0對(duì)應(yīng)的版本即可解決問題。
解決:TypeError: Descriptors cannot not be created directly,Python,python,開發(fā)語言
在PyCharm終端輸入以下命令安裝3.19.0版本的protobuf即可解決問題,具體代碼如下所示:

pip install protobuf==3.19.0

下載完畢后即可正確輸出paddle的版本!文章來源地址http://www.zghlxwxcb.cn/news/detail-674650.html

到了這里,關(guān)于解決:TypeError: Descriptors cannot not be created directly的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

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

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

相關(guān)文章

  • Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

    Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

    當(dāng)我們運(yùn)行代碼要運(yùn)用到cv2庫時(shí),提示我們沒有安裝cv2,而直接用pip install opencv-python下載卻顯示下載失?。?Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly 直接運(yùn)用conda安裝: 隨后完成cv2的安裝。

    2024年02月10日
    瀏覽(37)
  • ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

    ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

    pip install --upgrade -r requirements.txt -i https://mirror.baidu.com/pypi/simple Looking in indexes: https://mirror.baidu.com/pypi/simple Collecting prettytable Downloading https://mirror.baidu.com/pypi/packages/5f/ab/64371af206988d7b15c8112c9c277b8eb4618397c01471e52b902a17f59c/prettytable-3.3.0-py3-none-any.whl (26 kB) Collecting ujson Downloading https://

    2024年01月22日
    瀏覽(26)
  • Could not build wheels for opencv-python-headless which use PEP 517 and cannot be installed directly

    筆者是python環(huán)境下安裝 albumentations 出現(xiàn)的,該庫經(jīng)常用于圖像增強(qiáng),在cv領(lǐng)域有很大的知名度。在使用下邊的命令進(jìn)行安裝后 就報(bào)了 ERROR:Could not build wheels for opencv-python-headless which use PEP 517 and cannot be installed directly 。 albumentations庫依賴opencv,在直接使用pip命令安裝時(shí),albumen

    2024年02月15日
    瀏覽(22)
  • git fatal: ‘xxx‘ is not a commit and a branch ‘xxx‘ ‘ cannot be created from it

    當(dāng)拉取一個(gè)git遠(yuǎn)程倉(cāng)庫分支時(shí)報(bào)錯(cuò): 命令:git checkout -b 本地分支名 遠(yuǎn)程分支名 報(bào)錯(cuò):fatal: \\\'origin/dev_v2.8.4_v10.74.1\\\' is not a commit and a branch \\\'dev_v2.8.4_v10.74.1\\\' cannot be created from it 遠(yuǎn)程新建的分支沒有更新到本地。實(shí)際上,git倉(cāng)庫分為本地倉(cāng)庫和遠(yuǎn)程倉(cāng)庫,我們用 checkout 命令是從本

    2024年02月10日
    瀏覽(22)
  • 【Git報(bào)錯(cuò)】fatal: ‘origin/XXX‘ is not a commit and a branch ‘XXX‘ cannot be created from it

    【Git報(bào)錯(cuò)】fatal: ‘origin/XXX‘ is not a commit and a branch ‘XXX‘ cannot be created from it

    發(fā)現(xiàn)問題 遠(yuǎn)程已有分支,本地需要新建對(duì)應(yīng)分支,于是執(zhí)行命令: git checkout --track origin/XXX 時(shí)報(bào)錯(cuò)。 原因: 遠(yuǎn)程真的沒有這個(gè)分支,所以失敗 這個(gè)情況沒什么好說的 遠(yuǎn)程有這個(gè)分支,但是本地認(rèn)為遠(yuǎn)程沒有這個(gè)分支 執(zhí)行如下命令,查看本地緩存的所有遠(yuǎn)程分支,看看你要

    2024年02月16日
    瀏覽(23)
  • 【已解決】moviepy視頻剪輯TypeError: must be real number, not NoneType問題

    MMAction2中:基于人體姿態(tài)預(yù)測(cè)動(dòng)作標(biāo)簽 之后顯示以下消息后,表明正在構(gòu)建和編寫視頻: 但出現(xiàn)以下錯(cuò)誤提示: 通過參考網(wǎng)友建議: python - 每當(dāng)嘗試將 write_videofile 運(yùn)行到 moviepy 中的剪輯時(shí),都會(huì)出現(xiàn) \\\"TypeError: must be real number, not NoneType\\\" - IT工具網(wǎng) (coder.work) 最佳方式是升級(jí)

    2024年02月10日
    瀏覽(28)
  • git拉取遠(yuǎn)程分支到本地報(bào)錯(cuò)fatal: ‘origin/XXX‘ is not a commit and a branch ‘XXX‘ cannot be created from it

    git拉取遠(yuǎn)程分支到本地報(bào)錯(cuò)fatal: ‘origin/XXX‘ is not a commit and a branch ‘XXX‘ cannot be created from it

    遠(yuǎn)程已有分支,本地需要新建對(duì)應(yīng)分支,報(bào)下面錯(cuò)誤 原因: 遠(yuǎn)程真的沒有這個(gè)分支,所以失敗 遠(yuǎn)程有這個(gè)分支,但是本地認(rèn)為遠(yuǎn)程沒有這個(gè)分支 執(zhí)行 git branch -r 命令,查看本地緩存的所有遠(yuǎn)程分支 輸出顯示遠(yuǎn)程并沒有要拉取的分支,但是實(shí)際上遠(yuǎn)程倉(cāng)庫是有該分支的,從

    2024年02月15日
    瀏覽(28)
  • 【Python】成功解決TypeError: list indices must be integers or slices, not float

    【Python】成功解決TypeError: list indices must be integers or slices, not float

    【Python】成功解決TypeError: list indices must be integers or slices, not float ?? 個(gè)人主頁:高斯小哥 ?? 高質(zhì)量專欄:Matplotlib之旅:零基礎(chǔ)精通數(shù)據(jù)可視化、Python基礎(chǔ)【高質(zhì)量合集】、PyTorch零基礎(chǔ)入門教程?? 希望得到您的訂閱和支持~ ?? 創(chuàng)作高質(zhì)量博文(平均質(zhì)量分92+),分享更多關(guān)

    2024年04月27日
    瀏覽(30)
  • 【已解決】Flask項(xiàng)目報(bào)錯(cuò)TypeError: tuple indices must be integers or slices, not str

    【已解決】Flask項(xiàng)目報(bào)錯(cuò)TypeError: tuple indices must be integers or slices, not str

    本解決方案適用情境 :在 本地可以正常運(yùn)行 的flask項(xiàng)目, 放到云服務(wù)器報(bào)錯(cuò) TypeError: tuple indices must be integers or slices, not str,即代碼本身無誤的前提,可能因?yàn)榄h(huán)境差異導(dǎo)致的問題。 報(bào)錯(cuò)代碼 TypeError: tuple indices must be integers or slices, not str 這個(gè)錯(cuò)誤的意思是元組索引必須是整

    2024年02月17日
    瀏覽(30)
  • 【前端】報(bào)錯(cuò)TypeError: Cannot create property ‘xxx‘ on string ‘xxx‘

    報(bào)錯(cuò)原因分析:賦值的類型錯(cuò)誤 前端在遍歷時(shí)通過判斷條件為數(shù)據(jù)添加屬性時(shí)報(bào)錯(cuò),在重新查看代碼時(shí)發(fā)現(xiàn)為遍歷語句錯(cuò)誤。 for (let item in list) {} for (let item of list) {} 二者的不同之處在于,前者在遍歷數(shù)組時(shí)若數(shù)組下存在屬性,則會(huì)對(duì)屬性也進(jìn)行遍歷操作,故報(bào)賦值的類型錯(cuò)

    2024年02月09日
    瀏覽(15)

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

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包