【问题标题】:Problem related to anaconda and python libraries与 anaconda 和 python 库相关的问题
【发布时间】:2020-04-01 10:41:26
【问题描述】:

每次我在 jupyter 中导入任何库都会显示这种类型的错误,我使用的是 64 位窗口操作系统。

OSError Traceback (most recent call last) in ----> 1 import pandas as pd 2 digit = pd.read_csv(r'E:\ML_Codes\all\train.csv')

~\AppData\Roaming\Python\Python37\site-packages\pandas__init__.py in 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\Python3.7\site-packages\numpy__init__.py in 138 139 # Allow distributors to run custom init code --> 140 from . import _distributor_init 141 142 from . import core

~\AppData\Roaming\Python\Python37\site-packages\numpy_distributor_init.py in 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:

C:\anacondanewww\lib\ctypes__init__.py in init(self, name, mode, handle, use_errno, use_last_error) 362 363 if handle is None: --> 364 self._handle = _dlopen(self._name, mode) 365 else: 366 self._handle = handle

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

【问题讨论】:

    标签: python python-3.x windows jupyter-notebook anaconda


    【解决方案1】:

    从查看错误消息来看,似乎存在某种依赖问题,我认为这是由一些奇怪的安装错误引起的。

    对于最简单的解决方案,我建议删除所有 Python3.x 实例并删除文件夹(对安装 anaconda 执行相同操作),然后重新安装 anaconda,然后尝试

    第二个可能出错的地方是,在运行 Jupyter 笔记本时,您可能没有使用安装了 pandas 库的正确 python 版本。看看您是否在右上角有多个选项可供选择提到了你需要选择的 Python 版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-09-15
      • 2021-04-13
      • 2021-12-22
      • 1970-01-01
      • 2020-01-15
      • 2019-11-07
      • 2015-08-26
      相关资源
      最近更新 更多