I'm using Anaconda and Windows 10 and have to install the XGBoost package. I managed to do it for python using this helpful article (http://www.picnet.com.au/blogs/guido/2016/09/22/xgboost-windows-x64-binaries-for-download/) and tried to install it in Anaconda according to this question (Windows xgboost error). Somehow, it appeared that the command 'python setup.py install' tries to change a wrong directory (C:\Program Files... instead of D:\Anaconda...) How can I change the installation directory so that changes are made where they should?
Asked
Active
Viewed 7,243 times
1
-
If you run "python" anywhere in your command shell, it will pick the one that is registered in the `path` variable of Windows. Have you checked if it's the right one (D:\Anaconda\...)? – offeltoffel Dec 06 '18 at 12:04
-
can you post the output of the following command below? `python -c "import sys; print(sys.executable)"` – Felix Dec 06 '18 at 12:08
-
No, but the path that it picks (C:\Program Files\…) isn't registered in the path variable either – Some guy Dec 06 '18 at 12:11
-
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe that is the directory it tries to change and the output of python -c "import sys; print(sys.executable)" – Some guy Dec 06 '18 at 12:14
1 Answers
1
try to activate the correct Anaconda in your console by executing the activate
script in the appropriate folder, e.g.:
D:\Anaconda\Scripts\activate
You might have to slightly adjust the path to your installation. If this works, you'll see (base)
in front of the next line in the command prompt. On my machine, I get this output:
C:\Users\felix>C:\Users\felix\Anaconda3\Scripts\activate
(base) C:\Users\felix>
After anaconda is activated, executing python
should use the correct executable. You can verify this using the command I posted as a comment before:
python -c "import sys; print(sys.executable)"
Does this answer your question?

Felix
- 6,131
- 4
- 24
- 44
-
Yeah, that worked! Thanks very much, I've been trying to install XGBoost for the whole day and succeeded only after your answer) – Some guy Dec 06 '18 at 13:01
-