AttributeError:dlsym(RTLD_DEFAULT,AbsoluteToNanoseconds):找不到符号

时间:2019-07-03 21:28:46

标签: python python-2.7 anaconda install conda

我正在尝试在macOS Mojave上运行“ conda安装内容”,但我无处不在都遇到此错误:

conda install update

这是整个回溯:

Traceback (most recent call last):
  File "/anaconda2/bin/conda", line 13, in <module>
    sys.exit(main())
  File "/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 149, in main
    from ..exceptions import conda_exception_handler
  File "/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 18, in <module>
    from ._vendor.auxlib.entity import EntityEncoder
  File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/entity.py", line 253, in <module>
    from .collection import AttrDict, frozendict, make_immutable
  File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/collection.py", line 10, in <module>
    from .compat import isiterable, iteritems, odict, text_type
  File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/compat.py", line 10, in <module>
    from ._vendor.five import WhateverIO as StringIO, with_metaclass
  File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/_vendor/five.py", line 80, in <module>
    absolute_to_nanoseconds = CoreServices.AbsoluteToNanoseconds
  File "/anaconda2/lib/python2.7/ctypes/__init__.py", line 379, in __getattr__
    func = self.__getitem__(name)
  File "/anaconda2/lib/python2.7/ctypes/__init__.py", line 384, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not found

我该如何解决?

1 个答案:

答案 0 :(得分:1)

我在 macOS Big Sur 上发生了类似的错误,删除 miniconda2 并安装 miniconda3 对我有用。

我按照 https://docs.conda.io/en/latest/miniconda.html 上的说明进行操作,基本上是:

rm -rf ~/miniconda2
rm -rf ~/.condarc ~/.conda ~/.continuum
bash Miniconda3-latest-MacOSX-x86_64.sh # after downloading the installable