1

I have install py-xgboost from anaconda using:

conda install py-xgboost

where it is shown up when I run

conda list
conda env export

But from pip it doesnt show up:

pip freeze

Is there a way to make pip able to 'see' xg-boost that is installed from a conda package? The reason I need this is because I need speedml which has a dependency on xg-boost and speedml is only available to me from pip (the enterprise anaconda repo do not have speedml).

Thanks!!

Rohan Nadagouda
  • 462
  • 7
  • 18
David Tam
  • 485
  • 5
  • 13
  • I can't see a way out other than removing the xg-boost conda package and installing it using pip. – loudmummer Jun 15 '18 at 12:20
  • @loudmummer ok thanks it is such a shame that anaconda built this conda package that is readily available to use but it is not 'seen' by pip. What is the rule behind it? While most of the conda packages I installed can be recognized by pip why not py-xgboost? Is it because the conda package name is different to the pip package name? – David Tam Jun 15 '18 at 12:27
  • It seems xgboost needs to be built from source which is a lot of hassle for me - for one thing github is banned in my workplace. – David Tam Jun 15 '18 at 12:29
  • Well, I am not sure exactly what happens there, but I think there are some compatibility issues between certain conda packages and their pip counterparts. If you are using conda, it is always recommended to get pip packages only when unavoidable, but this is a very tricky situation you have here. – loudmummer Jun 15 '18 at 12:42
  • @DavidTam where do you get your pip from? The trick often is to install pip from conda and use that. Than pip can see all conda packages. Btw, why did you install `py-xgboost` and not `xgboost`? What is the difference? – Mischa Lisovyi Jun 15 '18 at 13:21
  • @MykhailoLisovyi it is conda pip (output from conda env export: "- pip=10.0.1=py36_0") – David Tam Jun 15 '18 at 13:35
  • Did you check that pip from conda is actually picked when you run pip, i.e. what does `which pip` output? – Mischa Lisovyi Jun 15 '18 at 14:02
  • @MykhailoLisovyi yes in fact I created a new conda environment using `conda create -n python=3.6`. `which pip` returns `/c/Users//AppData/Local/conda/conda/envs//Scripts/pip` and yes I am on windows – David Tam Jun 15 '18 at 14:42

1 Answers1

0

This can actually be solved by using

--no-deps

as described in this SO question So for example what I need is speedml but it requires xgboost then I create the conda environment, installed py-xgboostm, and run the following in same conda env.:

pip install speedml --no-dependencies

And afterwards speedml works!

David Tam
  • 485
  • 5
  • 13