如何解决多个 Python 安装;导入 scipy 失败,出现 WinError 193
我使用 anaconda 安装软件包。但是当我在 Jupyter Notebook 中导入时它失败了 OSError: WinError 193
以下是错误信息:
<ipython-input-1-4363d2be0702> in <module>
----> 1 import scipy
~\AppData\Roaming\Python\python38\site-packages\scipy\__init__.py in <module>
104
105 # Allow distributors to run custom init code
--> 106 from . import _distributor_init
107
108 __all__ += _num.__all__
~\AppData\Roaming\Python\python38\site-packages\scipy\_distributor_init.py in <module>
24 if os.path.isdir(libs_path):
25 for filename in glob.glob(os.path.join(libs_path,'*dll')):
---> 26 WinDLL(os.path.abspath(filename))
~\anaconda3\lib\ctypes\__init__.py in __init__(self,name,mode,handle,use_errno,use_last_error,winmode)
371
372 if handle is None:
--> 373 self._handle = _dlopen(self._name,mode)
374 else:
375 self._handle = handle
以下是我认为它不起作用的原因:
-
我有多个版本:Python 3.7 和 3.8。我从下载中下载了它们,然后使用控制面板删除了 Python 3.7。但是,我删除它们后,仍然可以找到一些Python 3.7的文件。我不知道为什么。我如何手动完全删除 Python 3.7,因为我认为这可能是一个问题。
-
环境可能一团糟。但我不知道如何检查它是否正确。
我还会在命令提示符下输入 pip list 来检查我到目前为止下载的包。我可以在列表中找到 scipy。结果如下。
Package Version
------------------ -------
attrs 19.3.0
backcall 0.2.0
bleach 3.1.5
colorama 0.4.3
decorator 4.4.2
defusedxml 0.6.0
entrypoints 0.3
ipykernel 5.3.0
ipython 7.15.0
ipython-genutils 0.2.0
ipywidgets 7.5.1
jedi 0.17.0
Jinja2 2.11.2
jsonschema 3.2.0
jupyter 1.0.0
jupyter-client 6.1.3
jupyter-console 6.1.0
jupyter-core 4.6.3
jupyterthemes 0.20.0
lesscpy 0.14.0
MarkupSafe 1.1.1
mistune 0.8.4
mpmath 1.1.0
nbconvert 5.6.1
nbformat 5.0.6
nose 1.3.7
notebook 6.0.3
numpy 1.18.5
packaging 20.4
pandas 1.0.4
pandocfilters 1.4.2
parso 0.7.0
pickleshare 0.7.5
pip 20.1.1
ply 3.11
prometheus-client 0.8.0
prompt-toolkit 3.0.5
Pygments 2.6.1
pyparsing 2.4.7
pyrsistent 0.16.0
python-dateutil 2.8.1
pytz 2020.1
pywin32 227
pywinpty 0.5.7
pyzmq 19.0.1
qtconsole 4.7.4
qtpy 1.9.0
scipy 1.4.1
Send2Trash 1.5.0
setuptools 47.1.0
six 1.15.0
sympy 1.6
terminado 0.8.3
testpath 0.4.4
tornado 6.0.4
traitlets 4.3.3
wcwidth 0.2.4
webencodings 0.5.1
widgetsnbextension 3.5.1
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。