Получение EOFError на python3 при попытке импортировать scikit-learn - PullRequest
0 голосов
/ 22 мая 2019

Получение этой ошибки на python3. Похоже, проблема в scikit-learn.

Это на Linux. Я попытался удалить все пакеты (numpy, scipy, scikit-learn и т. Д.) И переустановить их, но ничего не вышло.

Traceback (most recent call last):
  File "script.py", line 7, in <module>
    import util.utility as util
  File "/home/user/util/utility.py", line 6, in <module>
    import sklearn
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/__init__.py", line 64, in <module>
    from .base import clone
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/base.py", line 14, in <module>
    from .utils.fixes import signature
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/utils/__init__.py", line 14, in <module>
    from . import _joblib
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/utils/_joblib.py", line 22, in <module>
    from ..externals import joblib
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/externals/joblib/__init__.py", line 119, in <module>
    from .parallel import Parallel
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/externals/joblib/parallel.py", line 28, in <module>
    from ._parallel_backends import (FallbackToBackend, MultiprocessingBackend,
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/externals/joblib/_parallel_backends.py", line 22, in <module>
    from .executor import get_memmapping_executor
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/externals/joblib/executor.py", line 14, in <module>
    from .externals.loky.reusable_executor import get_reusable_executor
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/externals/joblib/externals/loky/__init__.py", line 13, in <module>
    from .reusable_executor import get_reusable_executor
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/externals/joblib/externals/loky/reusable_executor.py", line 11, in <module>
    from .process_executor import ProcessPoolExecutor, EXTRA_QUEUED_CALLS
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/externals/joblib/externals/loky/process_executor.py", line 84, in <module>
    from .backend.utils import recursive_terminate, get_exitcodes_terminated_worker
  File "/home/user/anaconda3/lib/python3.7/site-packages/sklearn/externals/joblib/externals/loky/backend/utils.py", line 10, in <module>
    import psutil
  File "/home/user/anaconda3/lib/python3.7/site-packages/psutil/__init__.py", line 41, in <module>
    from . import _common
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 857, in get_code
  File "<frozen importlib._bootstrap_external>", line 525, in _compile_bytecode
EOFError: EOF read where object expected
...