Traceback (most recent call last): File "<ipython-input-9-a40793f9ded7>", line 7, in <module> from sklearn.model_selection import train_test_split File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\__init__.py", line 76, in <module> from .base import clone File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\base.py", line 16, in <module> from .utils import _IS_32BIT File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\utils\__init__.py", line 20, in <module> from .validation import (as_float_array, File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\utils\validation.py", line 21, in <module> from .fixes import _object_dtype_isnan File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\utils\fixes.py", line 18, in <module> from scipy.sparse.linalg import lsqr as sparse_lsqr # noqa File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\sparse\linalg\__init__.py", line 113, in <module> from .isolve import * File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in <module> from .iterative import * File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 10, in <module> from . import _iterativeImportError: DLL load failed: The file cannot be accessed by the system.在嘗試在pycharm上運行一些已經(jīng)使用的python腳本時遇到此錯誤。以前有沒有人遇到過這個錯誤,他解決了嗎?它是在我用python安裝軟件包后開始的,但從未使用過它。當我嘗試在scikit-learn和tensorflow,sklearn包和seaborn上導(dǎo)入train_test_split時,問題就在這里。代碼的其他部分似乎不受影響。我已經(jīng)重新安裝了anaconda和python以及更改python文件。任何幫助將不勝感激。
1 回答

慕斯王
TA貢獻1864條經(jīng)驗 獲得超2個贊
重新安裝python以及更新所有包(conda update --all)并更改PATH文件后,除了PyCharm之外,似乎在我的所有IDE中都解決了這個問題。似乎剩下的只是一個口譯員問題。如果其他事情引起我的注意,我會發(fā)布更新。
添加回答
舉報
0/150
提交
取消