我只是运行命令conda update conda。在那之后,我所有的命令都给出了AttributeError: module 'brotli' has no attribute 'error'。我搜索了解决方案,但无济于事。Anaconda 错误 - 模块“brotli”没有属性“错误”似乎是一个合理的答案,但我的 anaconda3/lib 目录不包含站点包文件夹。lib 文件夹包含以下内容。
conda update conda
AttributeError: module 'brotli' has no attribute 'error'
cmake libicudata.so.72.1 libQt5Designer.so.5 libQt5X11Extras.so.5 cups libicui18n.so libQt5Designer.so.5.15 libQt5X11Extras.so.5.15 cyrillic_and_mic.so libicui18n.so.72 libQt5Designer.so.5.15.8 libQt5X11Extras.so.5.15.8 dbus-1.0 libicui18n.so.72.1 libQt5DeviceDiscoverySupport.a libQt5XcbQpa.prl dict_snowball.so libicuio.so libQt5DeviceDiscoverySupport.prl libQt5XcbQpa.so euc2004_sjis2004.so libicuio.so.72 libQt5EdidSupport.a libQt5XcbQpa.so.5 euc_cn_and_mic.so libicuio.so.72.1 libQt5EdidSupport.prl libQt5XcbQpa.so.5.15 euc_jp_and_sjis.so libicutest.so libQt5EglFSDeviceIntegration.prl libQt5XcbQpa.so.5.15.8 euc_kr_and_mic.so libicutest.so.72 libQt5EglFSDeviceIntegration.so libQt5XkbCommonSupport.a euc_tw_and_big5.so libicutest.so.72.1 libQt5EglFSDeviceIntegration.so.5 libQt5XkbCommonSupport.prl gettext libicutu.so libQt5EglFSDeviceIntegration.so.5.15 libQt5XmlPatterns.prl girepository-1.0 libicutu.so.72 libQt5EglFSDeviceIntegration.so.5.15.8 libQt5XmlPatterns.so glib-2.0 libicutu.so.72.1 libQt5EglFsKmsSupport.prl libQt5XmlPatterns.so.5 gstreamer-1.0 libicuuc.so libQt5EglFsKmsSupport.so libQt5XmlPatterns.so.5.15 icu libicuuc.so.72 libQt5EglFsKmsSupport.so.5 libQt5XmlPatterns.so.5.15.8 itcl4.2.2 libicuuc.so.72.1 libQt5EglFsKmsSupport.so.5.15 libQt5Xml.prl krb5 libitm.so libQt5EglFsKmsSupport.so.5.15.8 libQt5Xml.so latin2_and_win1250.so libitm.so.1 libQt5EglSupport.a libQt5Xml.so.5 latin_and_mic.so libitm.so.1.0.0 libQt5EglSupport.prl libQt5Xml.so.5.15 libarchive.a libjpeg.a libQt5EventDispatcherSupport.a libQt5Xml.so.5.15.8 libarchive.so libjpeg.so libQt5EventDispatcherSupport.prl libquadmath.so libarchive.so.13 libjpeg.so.8 libQt5FbSupport.a libquadmath.so.0 libarchive.so.13.6.2 libjpeg.so.8.2.2 libQt5FbSupport.prl libquadmath.so.0.0.0 libasound.so libk5crypto.so libQt5FontDatabaseSupport.a libreadline.so libasound.so.2 libk5crypto.so.3 libQt5FontDatabaseSupport.prl libreadline.so.8 libasound.so.2.0.0 libk5crypto.so.3.1 libQt5Gamepad.prl libreadline.so.8.2 libasprintf.a libkadm5clnt_mit.so libQt5Gamepad.so libRemarks.so.16 libasprintf.so libkadm5clnt_mit.so.12 libQt5Gamepad.so.5 libsharpyuv.so libasprintf.so.0 libkadm5clnt_mit.so.12.0 libQt5Gamepad.so.5.15 libsharpyuv.so.0 libasprintf.so.0.0.0 libkadm5clnt.so libQt5Gamepad.so.5.15.8 libsharpyuv.so.0.0.0 libatomic.so libkadm5srv_mit.so libQt5GlxSupport.a libsmime3.so libatomic.so.1 libkadm5srv_mit.so.12 libQt5GlxSupport.prl libSM.so libatomic.so.1.2.0 libkadm5srv_mit.so.12.0 libQt5Gui.prl libSM.so.6 libatopology.so libkadm5srv.so libQt5Gui.so libSM.so.6.0.1 libatopology.so.2 libkdb5.so libQt5Gui.so.5 libsndfile.so libatopology.so.2.0.0 libkdb5.so.10 libQt5Gui.so.5.15 libsndfile.so.1 libattr.so libkdb5.so.10.0 libQt5Gui.so.5.15.8 libsndfile.so.1.0.35 libattr.so.1 libkeyutils.a libQt5Help.prl libsoftokn3.chk libattr.so.1.1.2501 libkeyutils.so libQt5Help.so libsoftokn3.so libblas.so libkeyutils.so.1 libQt5Help.so.5 libsqlite3.so libblas.so.3 libkeyutils.so.1.9 libQt5Help.so.5.15 libsqlite3.so.0 libbrotlicommon.so libkrad.so libQt5Help.so.5.15.8 libsqlite3.so.0.8.6 libbrotlicommon.so.1 libkrad.so.0 libQt5InputSupport.a libssl3.so libbrotlicommon.so.1.0.9 libkrad.so.0.0 libQt5InputSupport.prl libssl.so libbrotlidec.so libkrb5.so libQt5KmsSupport.a libssl.so.3 libbrotlidec.so.1 libkrb5.so.3 libQt5KmsSupport.prl libstdc++.so libbrotlidec.so.1.0.9 libkrb5.so.3.3 libQt5Location.prl libstdc++.so.6 libbrotlienc.so libkrb5support.so libQt5Location.so libstdc++.so.6.0.30 libbrotlienc.so.1 libkrb5support.so.0 libQt5Location.so.5 libsyn123.so libbrotlienc.so.1.0.9 libkrb5support.so.0.1 libQt5Location.so.5.15 libsyn123.so.0 libbz2.a liblapack.so libQt5Location.so.5.15.8 libsyn123.so.0.1.5 libbz2.so liblapack.so.3 libQt5MultimediaGstTools.prl libsystemd.so.0 libbz2.so.1.0 liblcms2.so libQt5MultimediaGstTools.so libsystemd.so.0.36.0 libbz2.so.1.0.8 liblcms2.so.2 libQt5MultimediaGstTools.so.5 libtcl8.6.so libcairo.a liblcms2.so.2.0.15 libQt5MultimediaGstTools.so.5.15 libtclstub8.6.a libcairo-gobject.a libLerc.so libQt5MultimediaGstTools.so.5.15.8 libtextstyle.a libcairo-gobject.so libLerc.so.4 libQt5Multimedia.prl libtextstyle.so libcairo-gobject.so.2 libLIEF.so libQt5MultimediaQuick.prl libtextstyle.so.0 libcairo-gobject.so.2.11600.0 libLLVM-16.so libQt5MultimediaQuick.so libtextstyle.so.0.1.2 libcairo-script-interpreter.a libLTO.so.16 libQt5MultimediaQuick.so.5 libtiff.so libcairo-script-interpreter.so liblz4.so libQt5MultimediaQuick.so.5.15 libtiff.so.6 libcairo-script-interpreter.so.2 liblz4.so.1 libQt5MultimediaQuick.so.5.15.8 libtiff.so.6.0.0 libcairo-script-interpreter.so.2.11600.0 liblz4.so.1.9.4 libQt5Multimedia.so libtiffxx.so libcairo.so liblzma.so libQt5Multimedia.so.5 libtiffxx.so.6 libcairo.so.2 liblzma.so.5 libQt5Multimedia.so.5.15 libtiffxx.so.6.0.0 libcairo.so.2.11600.0 liblzma.so.5.2.6 libQt5Multimedia.so.5.15.8 libtinfo.so libcap.a liblzo2.a libQt5MultimediaWidgets.prl libtinfo.so.6 libcap.so liblzo2.so libQt5MultimediaWidgets.so libtinfo.so.6.3 libcap.so.2 liblzo2.so.2 libQt5MultimediaWidgets.so.5 libtinfow.so libcap.so.2.67 liblzo2.so.2.0.0 libQt5MultimediaWidgets.so.5.15 libtinfow.so.6 libcblas.so libmenu.so libQt5MultimediaWidgets.so.5.15.8 libtinfow.so.6.3 libcblas.so.3 libmenu.so.6 libQt5NetworkAuth.prl libtk8.6.so libcharset.a libmenu.so.6.3 libQt5NetworkAuth.so libtkstub8.6.a libcharset.so libmenuw.so libQt5NetworkAuth.so.5 libturbojpeg.a libcharset.so.1 libmenuw.so.6 libQt5NetworkAuth.so.5.15 libturbojpeg.so libcharset.so.1.0.0 libmenuw.so.6.3 libQt5NetworkAuth.so.5.15.8 libturbojpeg.so.0 libclang.so libmp3lame.a libQt5Network.prl libturbojpeg.so.0.2.0 libclang.so.13 libmp3lame.so libQt5Network.so libuuid.a libcom_err.so libmp3lame.so.0 libQt5Network.so.5 libuuid.so libcom_err.so.3 libmp3lame.so.0.0.0 libQt5Network.so.5.15 libuuid.so.1 libcom_err.so.3.0 libmpg123.so libQt5Network.so.5.15.8 libuuid.so.1.3.0 libcrmf.a libmpg123.so.0 libQt5Nfc.prl libverto.so libcrypto.so libmpg123.so.0.47.0 libQt5Nfc.so libverto.so.0 libcrypto.so.3 libmysqlclient.so libQt5Nfc.so.5 libverto.so.0.0 libcupsimage.so libmysqlclient.so.21 libQt5Nfc.so.5.15 libvorbisenc.so libcupsimage.so.2 libmysqlclient.so.21.2.32 libQt5Nfc.so.5.15.8 libvorbisenc.so.2 libcups.so libncurses++.a libQt5OpenGLExtensions.a libvorbisenc.so.2.0.12 libcups.so.2 libncurses.so libQt5OpenGLExtensions.prl libvorbisfile.so libdbus-1.a libncurses.so.6 libQt5OpenGL.prl libvorbisfile.so.3 libdbus-1.so libncurses.so.6.3 libQt5OpenGL.so libvorbisfile.so.3.3.8 libdbus-1.so.3 libncurses++w.a libQt5OpenGL.so.5 libvorbis.so libdbus-1.so.3.24.0 libncursesw.so libQt5OpenGL.so.5.15 libvorbis.so.0 libdeflate.so libncursesw.so.6 libQt5OpenGL.so.5.15.8 libvorbis.so.0.4.9 libdeflate.so.0 libncursesw.so.6.3 libQt5PacketProtocol.a libwebpdecoder.so libecpg.a libnsl.so libQt5PacketProtocol.prl libwebpdecoder.so.3 libecpg_compat.a libnsl.so.3 libQt5PlatformCompositorSupport.a libwebpdecoder.so.3.1.6 libecpg_compat.so libnsl.so.3.0.0 libQt5PlatformCompositorSupport.prl libwebpdemux.so libecpg_compat.so.3 libnspr4.so libQt5Positioning.prl libwebpdemux.so.2 libecpg_compat.so.3.15 libnss3.so libQt5PositioningQuick.prl libwebpdemux.so.2.0.12 libecpg.so libnssckbi.so libQt5PositioningQuick.so libwebpmux.so libecpg.so.6 libnssckbi-testlib.so libQt5PositioningQuick.so.5 libwebpmux.so.3 libecpg.so.6.15 libnssdbm3.chk libQt5PositioningQuick.so.5.15 libwebpmux.so.3.0.11 libedit.so libnssdbm3.so libQt5PositioningQuick.so.5.15.8 libwebp.so libedit.so.0 libnsssysinit.so libQt5Positioning.so libwebp.so.7 libedit.so.0.0.63 libnssutil3.so libQt5Positioning.so.5 libwebp.so.7.1.6 libevent-2.1.so libogg.so libQt5Positioning.so.5.15 libX11.so libevent-2.1.so.7 libogg.so.0 libQt5Positioning.so.5.15.8 libX11.so.6 libevent-2.1.so.7.0.1 libogg.so.0.8.4 libQt5PrintSupport.prl libX11.so.6.4.0 libevent_core-2.1.so libopenblasp-r0.3.21.so libQt5PrintSupport.so libX11-xcb.so libevent_core-2.1.so.7 libopenblas.so.0 libQt5PrintSupport.so.5 libX11-xcb.so.1 libevent_core-2.1.so.7.0.1 libopenjp2.a libQt5PrintSupport.so.5.15 libX11-xcb.so.1.0.0 libevent_core.so libopenjp2.so libQt5PrintSupport.so.5.15.8 libXau.so libevent_extra-2.1.so libopenjp2.so.2.5.0 libQt5Purchasing.prl libXau.so.6 libevent_extra-2.1.so.7 libopenjp2.so.7 libQt5Purchasing.so libXau.so.6.0.0 libevent_extra-2.1.so.7.0.1 libopus.so libQt5Purchasing.so.5 libxcb-composite.so libevent_extra.so libopus.so.0 libQt5Purchasing.so.5.15 libxcb-composite.so.0 libevent_openssl-2.1.so libopus.so.0.8.0 libQt5Purchasing.so.5.15.8 libxcb-composite.so.0.0.0 libevent_openssl-2.1.so.7 libout123.so libQt5QmlDebug.a libxcb-damage.so libevent_openssl-2.1.so.7.0.1 libout123.so.0 libQt5QmlDebug.prl libxcb-damage.so.0 libevent_openssl.so libout123.so.0.4.7 libQt5QmlDevTools.a libxcb-damage.so.0.0.0 libevent_pthreads-2.1.so libpanel.so libQt5QmlDevTools.prl libxcb-dpms.so libevent_pthreads-2.1.so.7 libpanel.so.6 libQt5QmlModels.prl libxcb-dpms.so.0 libevent_pthreads-2.1.so.7.0.1 libpanel.so.6.3 libQt5QmlModels.so libxcb-dpms.so.0.0.0 libevent_pthreads.so libpanelw.so libQt5QmlModels.so.5 libxcb-dri2.so libevent.so libpanelw.so.6 libQt5QmlModels.so.5.15 libxcb-dri2.so.0 libexpat.a libpanelw.so.6.3 libQt5QmlModels.so.5.15.8 libxcb-dri2.so.0.0.0 libexpat.so libpcre2-16.so libQt5Qml.prl libxcb-dri3.so libexpat.so.1 libpcre2-16.so.0 libQt5Qml.so libxcb-dri3.so.0 libexpat.so.1.8.10 libpcre2-16.so.0.11.0 libQt5Qml.so.5 libxcb-dri3.so.0.1.0 libffi.a libpcre2-32.so libQt5Qml.so.5.15 libxcb-ewmh.a libffi.so libpcre2-32.so.0 libQt5Qml.so.5.15.8 libxcb-ewmh.so libffi.so.8 libpcre2-32.so.0.11.0 libQt5QmlWorkerScript.prl libxcb-ewmh.so.2 libffi.so.8.1.0 libpcre2-8.so libQt5QmlWorkerScript.so libxcb-ewmh.so.2.0.0 libFLAC++.so libpcre2-8.so.0 libQt5QmlWorkerScript.so.5 libxcb-glx.so libFLAC.so libpcre2-8.so.0.11.0 libQt5QmlWorkerScript.so.5.15 libxcb-glx.so.0 libFLAC++.so.10 libpcre2-posix.so libQt5QmlWorkerScript.so.5.15.8 libxcb-glx.so.0.0.0 libFLAC++.so.10.0.0 libpcre2-posix.so.3 libQt5Quick3DAssetImport.prl libxcb-icccm.a libFLAC.so.12 libpcre2-posix.so.3.0.2 libQt5Quick3DAssetImport.so libxcb-icccm.so libFLAC.so.12.0.0 libpgcommon.a libQt5Quick3DAssetImport.so.5 libxcb-icccm.so.4 libfontconfig.a libpgcommon_shlib.a libQt5Quick3DAssetImport.so.5.15 libxcb-icccm.so.4.0.0 libfontconfig.so libpgfeutils.a libQt5Quick3DAssetImport.so.5.15.8 libxcb-image.a libfontconfig.so.1 libpgport.a libQt5Quick3D.prl libxcb-image.so libfontconfig.so.1.13.0 libpgport_shlib.a libQt5Quick3DRender.prl libxcb-image.so.0 libform.so libpgtypes.a libQt5Quick3DRender.so libxcb-image.so.0.0.0 libform.so.6 libpgtypes.so libQt5Quick3DRender.so.5 libxcb-keysyms.a libform.so.6.3 libpgtypes.so.3 libQt5Quick3DRender.so.5.15 libxcb-keysyms.so libformw.so libpgtypes.so.3.15 libQt5Quick3DRender.so.5.15.8 libxcb-keysyms.so.1 libformw.so.6 libpixman-1.a libQt5Quick3DRuntimeRender.prl libxcb-keysyms.so.1.0.0 libformw.so.6.3 libpixman-1.so libQt5Quick3DRuntimeRender.so libxcb-present.so libfreebl3.chk libpixman-1.so.0 libQt5Quick3DRuntimeRender.so.5 libxcb-present.so.0 libfreebl3.so libpixman-1.so.0.40.0 libQt5Quick3DRuntimeRender.so.5.15 libxcb-present.so.0.0.0 libfreeblpriv3.chk libplc4.so libQt5Quick3DRuntimeRender.so.5.15.8 libxcb-randr.so libfreeblpriv3.so libplds4.so libQt5Quick3D.so libxcb-randr.so.0 libfreetype.a libpng16.a libQt5Quick3D.so.5 libxcb-randr.so.0.1.0 libfreetype.so libpng16.so libQt5Quick3D.so.5.15 libxcb-record.so libfreetype.so.6 libpng16.so.16 libQt5Quick3D.so.5.15.8 libxcb-record.so.0 libfreetype.so.6.18.3 libpng16.so.16.39.0 libQt5Quick3DUtils.prl libxcb-record.so.0.0.0 libgcc_s.so libpng.a libQt5Quick3DUtils.so libxcb-render.so libgcc_s.so.1 libpng.so libQt5Quick3DUtils.so.5 libxcb-render.so.0 libgcrypt.so libpq.a libQt5Quick3DUtils.so.5.15 libxcb-render.so.0.0.0 libgcrypt.so.20 libpq.so libQt5Quick3DUtils.so.5.15.8 libxcb-render-util.a libgcrypt.so.20.4.1 libpq.so.5 libQt5QuickControls2.prl libxcb-render-util.so libgettextlib-0.21.1.so libpq.so.5.15 libQt5QuickControls2.so libxcb-render-util.so.0 libgettextlib.so libpqwalreceiver.so libQt5QuickControls2.so.5 libxcb-render-util.so.0.0.0 libgettextpo.a libpsx.a libQt5QuickControls2.so.5.15 libxcb-res.so libgettextpo.so libpsx.so libQt5QuickControls2.so.5.15.8 libxcb-res.so.0 libgettextpo.so.0 libpsx.so.2 libQt5QuickParticles.prl libxcb-res.so.0.0.0 libgettextpo.so.0.5.8 libpsx.so.2.67 libQt5QuickParticles.so libxcb-screensaver.so libgettextsrc-0.21.1.so libpulse-mainloop-glib.so libQt5QuickParticles.so.5 libxcb-screensaver.so.0 libgettextsrc.so libpulse-mainloop-glib.so.0 libQt5QuickParticles.so.5.15 libxcb-screensaver.so.0.0.0 libgfortran.so libpulse-mainloop-glib.so.0.0.6 libQt5QuickParticles.so.5.15.8 libxcb-shape.so libgfortran.so.5 libpulse-simple.so libQt5Quick.prl libxcb-shape.so.0 libgfortran.so.5.0.0 libpulse-simple.so.0 libQt5QuickShapes.prl libxcb-shape.so.0.0.0 libgio-2.0.so libpulse-simple.so.0.1.1 libQt5QuickShapes.so libxcb-shm.so libgio-2.0.so.0 libpulse.so libQt5QuickShapes.so.5 libxcb-shm.so.0 libgio-2.0.so.0.7600.2 libpulse.so.0 libQt5QuickShapes.so.5.15 libxcb-shm.so.0.0.0 libglib-2.0.so libpulse.so.0.24.2 libQt5QuickShapes.so.5.15.8 libxcb.so libglib-2.0.so.0 libpython3.9.so libQt5Quick.so libxcb.so.1 libglib-2.0.so.0.7600.2 libpython3.9.so.1.0 libQt5Quick.so.5 libxcb.so.1.1.0 libgmodule-2.0.so libpython3.so libQt5Quick.so.5.15 libxcb-sync.so libgmodule-2.0.so.0 libQt53DAnimation.prl libQt5Quick.so.5.15.8 libxcb-sync.so.1 libgmodule-2.0.so.0.7600.2 libQt53DAnimation.so libQt5QuickTemplates2.prl libxcb-sync.so.1.0.0 libgobject-2.0.so libQt53DAnimation.so.5 libQt5QuickTemplates2.so libxcb-util.a libgobject-2.0.so.0 libQt53DAnimation.so.5.15 libQt5QuickTemplates2.so.5 libxcb-util.so libgobject-2.0.so.0.7600.2 libQt53DAnimation.so.5.15.8 libQt5QuickTemplates2.so.5.15 libxcb-util.so.1 libgomp.so libQt53DCore.prl libQt5QuickTemplates2.so.5.15.8 libxcb-util.so.1.0.0 libgomp.so.1 libQt53DCore.so libQt5QuickTest.prl libxcb-xf86dri.so libgomp.so.1.0.0 libQt53DCore.so.5 libQt5QuickTest.so libxcb-xf86dri.so.0 libgpg-error.so libQt53DCore.so.5.15 libQt5QuickTest.so.5 libxcb-xf86dri.so.0.0.0 libgpg-error.so.0 libQt53DCore.so.5.15.8 libQt5QuickTest.so.5.15 libxcb-xfixes.so libgpg-error.so.0.33.1 libQt53DExtras.prl ...
此外,使用 conda 的任何类型的命令都会给出相同的错误,因此conda install brotli解决方案不起作用。我该如何进行?(我在远程 linux 服务器上)
conda install brotli
Lib\site-packages\urllib3\response.py`尝试`import brotlicffi as brotli`然后尝试`import brotli`,这会产生`brotli.error AttributeError: module 'brotli' has no attribute 'error'.
pip install brotlicffi修复了 conda 中的错误。
pip install brotlicffi
这是我最终得到的版本。升级 conda 删除了 brotlipy-0.7.0-py310h2bbff1b_1002 并添加了几个 brotli 1.0.9 片段,可能至少缺少一个。
conda list | grep brotli brotli 1.0.9 hcfcfb64_8 conda-forge brotli-bin 1.0.9 hcfcfb64_8 conda-forge brotlicffi 1.0.9.2 pypi_0 pypi libbrotlicommon 1.0.9 hcfcfb64_8 conda-forge libbrotlidec 1.0.9 hcfcfb64_8 conda-forge libbrotlienc 1.0.9 hcfcfb64_8 conda-forge
随着 conda 再次工作,conda install brotlicffi清理了环境。期待以下 conda 投诉;它将安装 enum34 来修复。你可能需要重复conda install brotlicffi
conda install brotlicffi
The environment is inconsistent, please check the package plan carefully The following packages are causing the inconsistency: - pypi/pypi::brotlicffi==1.0.9.2=pypi_0
conda upgrade --all -n base应该可以正常工作。
conda upgrade --all -n base