当前位置:   article > 正文

Anaconda创建python3.10环境 ,pip报错:ImportError: DLL load failed while importing _ctypes: 找不到指定的模块。

importerror: dll load failed while importing _ctypes: 找不到指定的模块。

一、问题

  1. > pip
  2. Traceback (most recent call last):
  3. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\Scripts\pip-script.py", line 6, in <module>
  4. from pip._internal.cli.main import main
  5. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\cli\main.py", line 9, in <module>
  6. from pip._internal.cli.autocompletion import autocomplete
  7. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\cli\autocompletion.py", line 10, in <module>
  8. from pip._internal.cli.main_parser import create_main_parser
  9. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\cli\main_parser.py", line 9, in <module>
  10. from pip._internal.build_env import get_runnable_pip
  11. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\build_env.py", line 19, in <module>
  12. from pip._internal.cli.spinners import open_spinner
  13. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\cli\spinners.py", line 9, in <module>
  14. from pip._internal.utils.logging import get_indentation
  15. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\utils\logging.py", line 29, in <module>
  16. from pip._internal.utils.misc import ensure_dir
  17. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\utils\misc.py", line 43, in <module>
  18. from pip._internal.locations import get_major_minor_version
  19. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\locations\__init__.py", line 14, in <module>
  20. from . import _sysconfig
  21. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\locations\_sysconfig.py", line 11, in <module>
  22. from .base import change_root, get_major_minor_version, is_osx_framework
  23. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\locations\base.py", line 9, in <module>
  24. from pip._internal.utils import appdirs
  25. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_internal\utils\appdirs.py", line 13, in <module>
  26. from pip._vendor import platformdirs as _appdirs
  27. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_vendor\platformdirs\__init__.py", line 44, in <module>
  28. PlatformDirs = _set_platform_dir_class() #: Currently active platform
  29. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_vendor\platformdirs\__init__.py", line 23, in _set_platform_dir_class
  30. from pip._vendor.platformdirs.windows import Windows as Result
  31. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\site-packages\pip\_vendor\platformdirs\windows.py", line 3, in <module>
  32. import ctypes
  33. File "D:\Users\tangtang1600\Anaconda3\envs\automatic1\lib\ctypes\__init__.py", line 8, in <module>
  34. from _ctypes import Union, Structure, Array
  35. ImportError: DLL load failed while importing _ctypes: 找不到指定的模块。

二、解决方案

conda install python=3.10

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/196763
推荐阅读
相关标签
  

闽ICP备14008679号