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

一、问题

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

二、解决方案

conda install python=3.10

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2023年8月17日
下一篇 2023年8月17日

相关推荐

此站出售,如需请站内私信或者邮箱!