【发布时间】:2019-11-11 00:57:19
【问题描述】:
我试图执行
pip install spacy
它终于与 Python 3.7 64 位(不是 32 位版本)一起工作,但安装后没有其他包导入,如 pandas 正在工作。看来安装是根本原因,但是去掉spacy后pandas和很多其他包的导入错误还是一样。
重新安装python后(我总是直接安装在文件夹C:\Python中), 我可以成功安装 pandas 和所有其他软件包而不会出现以下错误,但我仍然无法使用 Spacy,因为我会收到导入错误:
OSError: [WinError 193] %1 不是有效的 Win32 应用程序
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-1-7dd3504c366f> in <module>
----> 1 import pandas as pd
c:\python\lib\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("{0}: {1}".format(dependency, str(e)))
~\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:
c:\python\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 ist keine zulässige Win32-Anwendung´´´
【问题讨论】:
-
你认为你可以翻译错误信息吗?
-
是的:“%1 不是有效的 win32 应用程序”。