1
from numpy._distributor_init import NUMPY_MKL
import pandas as pd
import numpy as np
import os
from imblearn.combine import SMOTEENN
import matplotlib.pyplot as plt
from sklearn import preprocessing
from sklearn import linear_model
from sklearn.metrics import classification_report
from numpy import loadtxt
import xgboost as xgb
from xgboost import XGBClassifier

This is my import code, and I'm using python3.6 and windows7-64bit 1. I have problem with importing numpy+mkl there's import error like this ->ImportError: cannot import name 'NUMPY_MKL'

I already installed numpy-1.13.1+mkl-cp36-cp36m-win_amd64.whl,scipy0.19.1-cp36-cp36m-win_amd64.whl,cmake-3.9.1-win64-x64 what shiuld I do?

2. I have problem with importing xgboost there's import error like this, and also I installed xgboost before

OSError                                   Traceback (most recent call last)
<ipython-input-8-8af05841d919> in <module>()
      9 from sklearn.metrics import classification_report
     10 from numpy import loadtxt
---> 11 import xgboost as xgb
     12 from xgboost import XGBClassifier
     13 import xgboost

c:\users\hyuna\miniconda3\lib\site-packages\xgboost\__init__.py in <module>()
      9 import os
     10 
---> 11 from .core import DMatrix, Booster
     12 from .training import train, cv
     13 from . import rabit                   # noqa

c:\users\hyuna\miniconda3\lib\site-packages\xgboost\core.py in <module>()
    110 
    111 # load the XGBoost library globally
--> 112 _LIB = _load_lib()
    113 
    114 

c:\users\hyuna\miniconda3\lib\site-packages\xgboost\core.py in _load_lib()
    104     if len(lib_path) == 0:
    105         return None
--> 106     lib = ctypes.cdll.LoadLibrary(lib_path[0])
    107     lib.XGBGetLastError.restype = ctypes.c_char_p
    108     return lib

c:\users\hyuna\miniconda3\lib\ctypes\__init__.py in LoadLibrary(self, name)
    420 
    421     def LoadLibrary(self, name):
--> 422         return self._dlltype(name)
    423 
    424 cdll = LibraryLoader(CDLL)

c:\users\hyuna\miniconda3\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
    342 
    343         if handle is None:
--> 344             self._handle = _dlopen(self._name, mode)
    345         else:
    346             self._handle = handle

OSError: [WinError 126] 지정된 모듈을 찾을 수 없습니다(specified module could not be found)
OregonTrail
  • 8,594
  • 7
  • 43
  • 58
신현아
  • 11
  • 2
  • for your first question, does https://stackoverflow.com/questions/37267399/importerror-cannot-import-name-numpy-mkl solve the issue? If not why not? – ftiaronsem Sep 08 '17 at 18:44
  • also how did you install xgboost? via pip? or did you compile it from source? – ftiaronsem Sep 08 '17 at 18:44

0 Answers0