我正在尝试遵循有关如何开始机器学习的教程,并且必须安装Scipy脚本,我通过命令提示符使用Pip安装了它。我一直收到此错误,如何将这些脚本添加到PATH。
# Check the versions of libraries
# Python version
# scipy
import scipy
print('scipy: {}'.format(scipy.__version__))
# numpy
import numpy
print('numpy: {}'.format(numpy.__version__))
# matplotlib
import matplotlib
print('matplotlib: {}'.format(matplotlib.__version__))
# pandas
import pandas
print('pandas: {}'.format(pandas.__version__))
# scikit-learn
import sklearn
print('sklearn: {}'.format(sklearn.__version__))
以下是错误:
File "c:\Users\chris\Desktop\Computer Science\ML_Test.py", line 6, in <module>
import scipy
File "C:\Users\chris\AppData\Roaming\Python\Python37\site-packages\scipy\__init__.py", line 62, in <module>
from numpy import show_config as show_numpy_config
File "C:\Users\chris\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 140, in <module>
from . import _distributor_init
File "C:\Users\chris\AppData\Roaming\Python\Python37\site-packages\numpy\_distributor_init.py", line 26, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Users\chris\AppData\Local\Programs\Python\Python37-32\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
答案 0 :(得分:0)
我有一个类似的问题。 从其他一些帖子看来,这似乎链接到dll pb。 但是,我不知道涉及哪个dll,以及如何用适当的dll替换它。