简体   繁体   中英

Changing the Anaconda installation directory

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?

try to activate the correct Anaconda in your console by executing the activate script in the appropriate folder, eg:

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM