无法在Jupyter笔记本上导入任何内容

时间:2019-09-19 17:51:48

标签: python numpy jupyter-notebook

我想导入Jupyter Notebook中的任何库:

import numpy as np

但是发生了以下错误:

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-1-0aa0b027fcb6> in <module>
----> 1 import numpy as np

~\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py in <module>
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 <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)
354 
355         if handle is None:
--> 356             self._handle = _dlopen(self._name, mode)
357         else:
358             self._handle = handle

OSError: [WinError 193] %1 geçerli bir Win32 uygulaması değil

如果我不导入任何东西,则不会发生任何错误。而且在所有库中这种情况都是一样的。我试图重新安装pip和重新安装numpy。而且我也尝试过删除笔记本并安装以前的版本。

0 个答案:

没有答案