Mac环境下使用Mamba安装Climada遭遇两类错误的排查与解决咨询
Mac环境下使用Mamba安装Climada遭遇两类错误的排查与解决咨询
我正在Mac上尝试安装Climada,已经装好了Anaconda,Python路径是/opt/anaconda3/bin/python,版本为3.11.8。
根据Climada的官方文档,需要用Mamba创建虚拟环境,命令是:
mamba create -n climada_env -c conda-forge climada
之后激活环境就能开始使用,但我试了两种方式都失败了,具体情况如下:
第一次尝试:在新虚拟环境中安装Mamba后再安装Climada
先创建新虚拟环境并在其中安装Mamba,这一步没什么问题。之后执行以下命令安装Climada:
mamba install -c conda-forge climada
结果得到了依赖冲突的错误,信息如下:
Pinned packages: - python=3.13 error libmamba Could not solve for environment specs The following packages are incompatible ├─ climada =* * is installable with the potential options │ ├─ climada [3.3.2|4.0.0|4.0.1|4.1.0] would require │ │ └─ python =3.9 *, which can be installed; │ └─ climada [4.1.0|5.0.0] would require │ └─ python >=3.9,<3.12 * with the potential options │ ├─ python [3.10.0|3.10.1|...|3.11.9], which can be installed; │ ├─ python 3.12.0rc3 would require │ │ └─ _python_rc =* *, which does not exist (perhaps a missing channel); │ └─ python [3.9.0|3.9.1|...|3.9.9], which can be installed; └─ pin on python 3.13.* =* * is not installable because it requires └─ python =3.13 *, which conflicts with any installable versions previously reported. critical libmamba Could not solve for environment specs
第二次尝试:在Base环境安装Mamba后创建虚拟环境
先在Base环境执行以下命令安装Mamba:
conda install -c conda-forge mamba
然后用官方文档的命令创建虚拟环境:
mamba create -n climada_env_2 -c conda-forge climada
这次直接出现了程序崩溃的错误,信息如下:
(base) donfry@DONs-Air ~ % mamba create -n climada_env_2 -c conda-forge climada *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x600003714330' *** First throw call stack: ( 0 CoreFoundation 0x000000018c242ccc __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000018bd2a788 objc_exception_throw + 60 2 CoreFoundation 0x000000018c2f502c -[NSObject(NSObject) __retain_OA] + 0 3 CoreFoundation 0x000000018c1accdc ___forwarding___ + 1580 4 CoreFoundation 0x000000018c1ac5f0 _CF_forwarding_prep_0 + 96 5 Foundation 0x000000018d2abcd4 -[NSProcessInfo arguments] + 188 6 CoreFoundation 0x000000018c2beaac __getDefaultArguments_block_invoke + 96 7 libdispatch.dylib 0x000000018bf3e3e8 _dispatch_client_callout + 20 8 libdispatch.dylib 0x000000018bf3fc68 _dispatch_once_callout + 32 9 CoreFoundation 0x000000018c2be448 _addBackstopValuesForIdentifierAndSource + 652 10 CoreFoundation 0x000000018c1783dc __81-[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 144 11 CoreFoundation 0x000000018c2be0e4 -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 272 12 CoreFoundation 0x000000018c17e764 -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 136 13 CoreFoundation 0x000000018c2fd54c __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.155 + 296 14 CoreFoundation 0x000000018c2fd1f4 -[_CFXPreferences withSearchLists:] + 84 15 CoreFoundation 0x000000018c179cb4 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 300 16 CoreFoundation 0x000000018c2fd3a0 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 384 17 CoreFoundation 0x000000018c1795d8 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 156 18 CoreFoundation 0x000000018c179500 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 112 19 SystemConfiguration 0x000000018cf2a818 SCDynamicStoreCopyProxiesWithOptions + 180 20 libcurl.4.dylib 0x0000000103308624 Curl_macos_init + 16 21 libcurl.4.dylib 0x00000001032e4ae8 global_init + 172 22 libcurl.4.dylib 0x00000001032e4a2c curl_global_init + 68 23 libmamba.2.0.0.dylib 0x0000000102f6cfac _GLOBAL__sub_I_singletons.cpp + 24 24 dyld 0x000000018bd8105c ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK3$_0clEv_block_invoke + 168 25 dyld 0x000000018bdbf0d4 ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.202 + 172 26 dyld 0x000000018bdb299c ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke + 496 27 dyld 0x000000018bd622fc _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE + 300 28 dyld 0x000000018bdb1930 _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE + 192 29 dyld 0x000000018bdb4208 _ZNK5dyld39MachOFile32forEachInitializerPointerSectionER11DiagnosticsU13block_pointerFvjjRbE + 160 30 dyld 0x000000018bdbedc8 _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv + 432 31 dyld 0x000000018bd7d070 _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 524 32 dyld 0x000000018bd83614 _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 36 33 dyld 0x000000018bd7d45c _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 220 34 dyld 0x000000018bd7d400 _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 128 35 dyld 0x000000018bd810ec _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv + 116 36 dyld 0x000000018bd7d628 _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE + 380 37 dyld 0x000000018bda04d8 _ZN5dyld44APIs25runAllInitializersForMainEv + 464 38 dyld 0x000000018bd66f7c _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3156 39 dyld 0x000000018bd65edc start + 1844 ) libc++abi: terminating due to uncaught exception of type NSException
请问这两类错误分别是什么原因导致的?更重要的是,我该如何解决这些问题?
备注:内容来源于stack exchange,提问作者user131627




