我正在使用 Visual Studio,并且正在尝试学习如何使用 scikit-learn/sklearn。我使用“pip”安装了它和所有其他软件包,没有任何问题。
我实际上只是想导入它。还没有其他代码。
每当我尝试导入它时,我都会收到以下错误:
Traceback (most recent call last):
File "c:/Users/samir/Code/Machine Learning A-Z/Machine Learning A-Z (Codes and Datasets)/Part 1 - Data Preprocessing/Section 2 Part 1 - Data Preprocessing/Python/data_preprocessing_Samir.py", line 20, in <module>
import sklearn
File "C:\Users\samir\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\__init__.py", line 82, in <module>
from .base import clone
File "C:\Users\samir\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\base.py", line 17, in <module>
from .utils import _IS_32BIT
File "C:\Users\samir\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\utils\__init__.py", line 20, in <module>
from scipy.sparse import issparse
File "C:\Users\samir\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\__init__.py", line 130, in <module>
from . import _distributor_init
File "C:\Users\samir\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\_distributor_init.py", line 61, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found