stop-cran
stop-cran

Reputation: 4408

Install XGBoost for Pycharm VirtualEnv (Windows)

I'm trying to install XGBoost package for my PyCharm project on Windows. Although I found XGBoost package in Project Interpreter - Install (+) - Available Packages menu, following error occurred during installation:

Collecting xgboost Using cached xgboost-0.6a2.tar.gz

No files/directories in C:\Users\\AppData\Local\Temp\pycharm-packaging\xgboost\pip-egg-info (from PKG-INFO)

I've found this answer regarding the installation XGBoost on Windows and it works for me.

However, when I then created a new PyCharm virtual environment, XGBoost is still not available, neither can I install it from Project Interpreter menu.

So the question is how to install XGBoost for PyCharm with VirtualEnv, running on Windows?

Thanks.

Upvotes: 1

Views: 3079

Answers (1)

codeape
codeape

Reputation: 100846

I suggest that instead of using the PyCharm settings dialog to install the package, you install the XGBoost package into the virtual environment using the command line.

If you a) run into problems installing XGBoost into a virtual environment and b) installing XGBoost in the root python installation works OK, I suggest you create the virtual environment using the --system-site-packages option (giving the virtual environment access to the system site-packages).

Also, check out the excellent site Python Extension Packages for Windows by Christoph Gohlke. There you will find prebuilt packages for a lot of hard-to-build-on-windows Python packages, including XGBoost 0.6 for Python 3.5 and 3.6.

And if you continue to have problems with the stock python distro (the one on www.python.org), I suggest give Anaconda a try. This SO question deals with installing XGBoost on Anaconda.

Upvotes: 2

Related Questions