首页 > 解决方案 > 需要解决方案:OSError: [WinError 193] %1 不是有效的 Win32 应用程序

问题描述

将熊猫导入为 pd

----> 1 import pandas as pd 中的 OSError Traceback(最近一次调用最后一次)

~\AppData\Roaming\Python\Python38\site-packages\pandas\__init__.py in <module>
      9 for dependency in hard_dependencies:
     10     try:
---> 11         __import__(dependency)
     12     except ImportError as e:
     13         missing_dependencies.append(f"{dependency}: {e}")

~\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py in <module>
    136 
    137     # Allow distributors to run custom init code
--> 138     from . import _distributor_init
    139 
    140     from . import core

~\AppData\Roaming\Python\Python38\site-packages\numpy\_distributor_init.py in <module>
     24                 # NOTE: would it change behavior to load ALL
     25                 # DLLs at this path vs. the name restriction?
---> 26                 WinDLL(os.path.abspath(filename))
     27                 DLL_filenames.append(filename)
     28         if len(DLL_filenames) > 1:

~\anaconda3\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error, winmode)
    379 
    380         if handle is None:
--> 381             self._handle = _dlopen(self._name, mode)
    382         else:
    383             self._handle = handle

OSError: [WinError 193] %1 is not a valid Win32 application  

标签: pandasgoogle-analyticsanacondadata-science

解决方案


我得到了答案:

您只需要从中删除Python文件夹AppData

它对我有用。


推荐阅读