Closed Ingvar-Y closed 6 years ago
Can you show what lib_path contains at this point? lib = ctypes.cdll.LoadLibrary(lib_path[0])
Update, closing.
I am not sure why you filed this bug here instead of the obvious place: https://github.com/conda-forge/eli5-feedstock
.. the rationale is xgboost works correctly on its own and that you could install literally hundreds of things that will not break xgboost, so therefore it's highly likely that eli5 contains the bug here.
Regardless I cannot reproduce this even when using eli5
from conda-forge
. I believe you are likely not activating your conda environment correctly here?
I tried the following:
conda create -n xgboost-eli5 python=3.6 py-xgboost=0.71 eli5 -c https://repo.continuum.io/pkgs/main -c conda-forge
conda activate xgboost-eli5
python -c "import eli5"
Adding print(lib_path)
to core.py gives:
['C:\\Users\\builder\\m64\\envs\\xgboost\\Library\\mingw-w64\\bin\\xgboost.dll']
My conda list --show-channel-urls
:
conda list --show-channel-urls
# packages in environment at C:\Users\builder\m64\envs\xgboost-eli5:
#
# Name Version Build Channel
attrs 18.1.0 py36_0 defaults
blas 1.0 mkl defaults
certifi 2018.4.16 py36_0 defaults
eli5 0.8 py_0 conda-forge
graphviz 2.38.0 7 conda-forge
icc_rt 2017.0.4 h97af966_0 defaults
intel-openmp 2018.0.0 8 defaults
jinja2 2.10 py36h292fed1_0 defaults
libxgboost 0.71 h6538335_0 defaults
m2w64-gcc-libgfortran 5.3.0 6 defaults
m2w64-gcc-libs 5.3.0 7 defaults
m2w64-gcc-libs-core 5.3.0 7 defaults
m2w64-gmp 6.1.0 2 defaults
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 defaults
markupsafe 1.0 py36h0e26971_1 defaults
mkl 2018.0.2 1 defaults
mkl_fft 1.0.1 py36h452e1ab_0 defaults
mkl_random 1.0.1 py36h9258bd6_0 defaults
msys2-conda-epoch 20160418 1 defaults
numpy 1.14.3 py36h9fa60d3_1 defaults
numpy-base 1.14.3 py36h555522e_1 defaults
py-xgboost 0.71 py36h6538335_0 defaults
python 3.6.5 h0c2934d_0 defaults
python-graphviz 0.8.2 py36_0 defaults
scikit-learn 0.19.1 py36h53aea1b_0 defaults
scipy 1.1.0 py36h672f292_0 defaults
setuptools 39.1.0 py36_0 defaults
singledispatch 3.4.0.3 py36h17d0c80_0 defaults
six 1.11.0 py36h4db2310_1 defaults
tabulate 0.8.2 py36_0 defaults
typing 3.6.4 py36_0 defaults
vc 14 h0510ff6_3 defaults
vs2015_runtime 14.0.25123 3 defaults
wincertstore 0.2 py36h7fe50ca_0 defaults
OK, I checked the obvious and tried import xgboost
- it results in the same error.
The contents of lib_path is
['C:\\Users\\I347500\\AppData\\Local\\Continuum\\anaconda3\\Library\\mingw-w64\\bin\\xgboost.dll']
Ok you need to run procmon, insert a pdb.set_trace() at that point, then single step it and look at what DLLs are causing you DLL-hell conflicts here. You'll probably have some core mingw-w64 DLLs in your C:\Windows\System32 folder or something like that.
Also, you say you checked the obvious, but I need you to do that in a minimal environment containing nothing but the essentials (and nothing from conda-forge
), so:
conda create -n xgboost python=3.6 py-xgboost=0.71 -c https://repo.continuum.io/pkgs/main
conda activate xgboost
.. then run your tests (and also show the output from conda list --show-channel-urls)
OK, I checked, import xgboost
works in new xgboost environment
conda list --show-channel-urls
# packages in environment at C:\Users\I347500\AppData\Local\Continuum\anaconda3\envs\xgboost:
#
# Name Version Build Channel
blas 1.0 mkl defaults
certifi 2018.4.16 py36_0 defaults
icc_rt 2017.0.4 h97af966_0 defaults
intel-openmp 2018.0.0 8 defaults
libxgboost 0.71 h6538335_0 defaults
m2w64-gcc-libgfortran 5.3.0 6 defaults
m2w64-gcc-libs 5.3.0 7 defaults
m2w64-gcc-libs-core 5.3.0 7 defaults
m2w64-gmp 6.1.0 2 defaults
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 defaults
mkl 2018.0.2 1 defaults
mkl_fft 1.0.1 py36h452e1ab_0 defaults
mkl_random 1.0.1 py36h9258bd6_0 defaults
msys2-conda-epoch 20160418 1 defaults
numpy 1.14.3 py36h9fa60d3_1 defaults
numpy-base 1.14.3 py36h555522e_1 defaults
pip 10.0.1 py36_0 defaults
py-xgboost 0.71 py36h6538335_0 defaults
python 3.6.5 h0c2934d_0 defaults
scikit-learn 0.19.1 py36h53aea1b_0 defaults
scipy 1.1.0 py36h672f292_0 defaults
setuptools 39.1.0 py36_0 defaults
vc 14 h0510ff6_3 defaults
vs2015_runtime 14.0.25123 3 defaults
wheel 0.31.1 py36_0 defaults
wincertstore 0.2 py36h7fe50ca_0 defaults
So something has broken your root environment (possibly some pip
usage?). You'll need to figure that out for yourself (maybe try to recreate the same package list in another env and compare the files individually?).
Using environment isolation like this is definitely the recommended approach to using AD/conda though.
OK, it's nice to know that the problem is me :) Yes, I used pip to install some packages that i uninstalled later which was probably not wise to do in the root environment. Thank you for your help!
Just in case anyone reads this issue in the future, the problem wasn't with packages at all. I used a custom bat file to call jupyter notebook directly from C:\Users\I347500\AppData\Local\Continuum\anaconda3\Scripts which was wrong. Starting jupyter from Anaconda Prompt solved it.
You can use a custom batch file if you wish, but you need to ensure to add call <CONDA_PREFIX>\Scripts\activate.bat
at the top.
Hi!
When I try to
import eli5
, a package available fromconda-forge
, it results in the following error:As a workaround I tried installing
xgboost
from another channel which resolved the issue - it seems the problem is onpy-xgboost
's side.conda info
conda list --show-channel-urls