我试图执行
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´´´