windows anaconda TypeError: LoadLibrary() argument 1 must be str, not None [Debug]

最新windows conda在运行时会报以下错误:

λ conda info -e

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "D:\ProgramFiles\Anaconda3\lib\site-packages\conda\exceptions.py", line 1062, in __call__
        return func(*args, **kwargs)
      File "D:\ProgramFiles\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
        exit_code = do_call(args, p)
      File "D:\ProgramFiles\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 80, in do_call
        module = import_module(relative_mod, __name__.rsplit('.', 1)[0])
      File "D:\ProgramFiles\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "D:\ProgramFiles\Anaconda3\lib\site-packages\conda\cli\main_info.py", line 19, in <module>
        from ..core.index import _supplement_index_with_system
      File "D:\ProgramFiles\Anaconda3\lib\site-packages\conda\core\index.py", line 9, in <module>
        from .package_cache_data import PackageCacheData
      File "D:\ProgramFiles\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 15, in <module>
        from conda_package_handling.api import InvalidArchiveError
      File "D:\ProgramFiles\Anaconda3\lib\site-packages\conda_package_handling\api.py", line 3, in <module>
        from libarchive.exception import ArchiveError as _LibarchiveArchiveError
      File "D:\ProgramFiles\Anaconda3\lib\site-packages\libarchive\__init__.py", line 1, in <module>
        from .entry import ArchiveEntry
      File "D:\ProgramFiles\Anaconda3\lib\site-packages\libarchive\entry.py", line 6, in <module>
        from . import ffi
      File "D:\ProgramFiles\Anaconda3\lib\site-packages\libarchive\ffi.py", line 48, in <module>
        libarchive = ctypes.cdll.LoadLibrary(libarchive_path)
      File "D:\ProgramFiles\Anaconda3\lib\ctypes\__init__.py", line 434, in LoadLibrary
        return self._dlltype(name)
      File "D:\ProgramFiles\Anaconda3\lib\ctypes\__init__.py", line 356, in __init__
        self._handle = _dlopen(self._name, mode)
    TypeError: LoadLibrary() argument 1 must be str, not None

`$ D:\ProgramFiles\Anaconda3\Scripts\conda-script.py info -e`


An unexpected error has occurred. Conda has prepared the above report.

看了一下原因,不知道啥时候最新Anaconda中多了一个folder: E:\ProgramFiles\Anaconda3\condabin\,所以conda.exe需要依赖某些环境变量没有,得按conda.bat来运行。。。

以前Anaconda的系统环境变量中只有:

  • E:\ProgramFiles\Anaconda3
  • E:\ProgramFiles\Anaconda3\Scripts

以后多一个:

  • E:\ProgramFiles\Anaconda3\condabin\

并且按照conda.bat info -e来运行

评论 11 您还未登录,请先 登录 后发表或查看评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页

打赏作者

taoqick

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值