dmlc / xgboost

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow
https://xgboost.readthedocs.io/en/stable/
Apache License 2.0
26.07k stars 8.7k forks source link

Got "bad marshal data" in Intel Python 2.7 #1719

Closed NKUCodingCat closed 6 years ago

NKUCodingCat commented 7 years ago

For bugs or installation issues, please provide the following information. The more information you provide, the more easily we will be able to offer help and advice.

Environment info

Operating System: Windows 10 14393

Compiler: VisualStudio 2015 / Guido Tapia’s Prebuilt

Package used (python/R/jvm/C++): Python

xgboost version used: Commit 6082184 / Guido Tapia’s Latest Build @ 20161029

If installing from source, please provide

VS 2015 building log vsbuilt.txt

Python import xgboost return:

C:\Users\NKUCodingcat\Desktop\xgboost\xgboost\python-package>C:\IntelPython27\python.exe -c "import xgboost"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "xgboost\__init__.py", line 11, in <module>
    from .core import DMatrix, Booster
  File "xgboost\core.py", line 18, in <module>
    from .compat import STRING_TYPES, PY3, DataFrame, py_str, PANDAS_INSTALLED
  File "xgboost\compat.py", line 49, in <module>
    from sklearn.preprocessing import LabelEncoder
  File "C:\IntelPython27\lib\site-packages\sklearn\preprocessing\__init__.py", line 31, in <module>
    from .imputation import Imputer
  File "C:\IntelPython27\lib\site-packages\sklearn\preprocessing\imputation.py", line 9, in <module>
    from scipy import stats
  File "C:\IntelPython27\lib\site-packages\scipy\stats\__init__.py", line 338, in <module>
    from .stats import *
  File "C:\IntelPython27\lib\site-packages\scipy\stats\stats.py", line 183, in <module>
    from . import distributions
  File "C:\IntelPython27\lib\site-packages\scipy\stats\distributions.py", line 10, in <module>
    from ._distn_infrastructure import (entropy, rv_discrete, rv_continuous,
  File "C:\IntelPython27\lib\site-packages\scipy\stats\_distn_infrastructure.py", line 24, in <module>
    from scipy import optimize
  File "C:\IntelPython27\lib\site-packages\scipy\optimize\__init__.py", line 234, in <module>
    from ._root import *
  File "C:\IntelPython27\lib\site-packages\scipy\optimize\_root.py", line 19, in <module>
    from .minpack import _root_hybr, leastsq
ValueError: bad marshal data (unknown type code)

If you are using python package, please provide

  1. The python version and distribution Python 2.7.11 (default, Jun 2 2016, 13:36:37) [ICC v.1600 64 bit (amd64) with MSC v.1500 CRT] on win32

    Steps to reproduce

  2. Download src from github and follow guide in here to build libxgboost.dll
  3. Use Python to install
  4. Python -c "import xgboost"

    What have you tried?

  5. Use a pre-built version (20161029) dll to replace the original one
AbdealiLoKo commented 7 years ago

It is probably because one of you *.pyc files are corrupt. Can you do a fresh make after deleting all the .pyc ?

NKUCodingCat commented 7 years ago

Well, I tried the latest dll in Guido Tapia’s blog and delete each *.pyc file I could find but it does not help, Let me try to make by myself

NKUCodingCat commented 7 years ago

Build my myself does not help, neither.