JuliusWang0 2021-04-23 14:59 采纳率: 0%
浏览 63

Mac 突然无法在终端使用conda create等命令,但依然可以激活conda虚拟环境

运行conda env list出现的结果

 

 

Traceback (most recent call last):

  File "/opt/anaconda2/bin/conda", line 13, in <module>

    sys.exit(main())

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 150, in main

    return conda_exception_handler(_main, *args, **kwargs)

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1371, in conda_exception_handler

    return_value = exception_handler(func, *args, **kwargs)

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1082, in __call__

    return self.handle_exception(exc_val, exc_tb)

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1126, in handle_exception

    return self.handle_unexpected_exception(exc_val, exc_tb)

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1137, in handle_unexpected_exception

    self.print_unexpected_error_report(error_report)

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1207, in print_unexpected_error_report

    from .cli.main_info import get_env_vars_str, get_main_info_str

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/cli/main_info.py", line 19, in <module>

    from ..core.index import _supplement_index_with_system

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/core/index.py", line 10, in <module>

    from .package_cache_data import PackageCacheData

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/core/package_cache_data.py", line 15, in <module>

    from .path_actions import CacheUrlAction, ExtractPackageAction

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/core/path_actions.py", line 30, in <module>

    from ..gateways.connection.download import download

  File "/opt/anaconda2/lib/python2.7/site-packages/conda/gateways/connection/download.py", line 13, in <module>

    import ctypes

  File "/opt/anaconda2/lib/python2.7/ctypes/__init__.py", line 7, in <module>

    from _ctypes import Union, Structure, Array

ImportError: dlopen(/opt/anaconda2/lib/python2.7/lib-dynload/_ctypes.so, 2): Library not loaded: @rpath/libffi.6.dylib

  Referenced from: /opt/anaconda2/lib/python2.7/lib-dynload/_ctypes.so

  Reason: image not found

  • 写回答

1条回答 默认 最新

  • 梦幻编织者 2023-05-09 11:40
    关注

    这个错误是由于缺少libffi.6.dylib库文件导致的。可以尝试以下方法解决:

    更新conda:在终端中输入conda update conda,然后输入y确认更新。

    重新安装libffi库:在终端中输入brew install libffi。

    更新环境变量:在终端中输入export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib/:$DYLD_FALLBACK_LIBRARY_PATH,然后再次运行conda env list。

    评论

报告相同问题?

悬赏问题

  • ¥15 微信小程序商城如何实现多商户收款 平台分润抽成
  • ¥15 HC32L176调试了一个通过TIMER5+DMA驱动WS2812B
  • ¥15 cocos的js代码调用wx.createUseInfoButton问题!
  • ¥15 关于自相关函数法和周期图法实现对随机信号的功率谱估计的matlab程序运行的问题,请各位专家解答!
  • ¥15 Python程序,深度学习,有偿私
  • ¥15 扫描枪扫条形码出现问题
  • ¥35 poi合并多个word成一个新word,原word中横版没了.
  • ¥15 【火车头采集器】搜狐娱乐这种列表页网址,怎么采集?
  • ¥15 求MCSCANX 帮助
  • ¥15 机器学习训练相关模型