[英]Changing the Anaconda installation directory
I'm using Anaconda and Windows 10 and have to install the XGBoost package. 我正在使用Anaconda和Windows 10,并且必须安装XGBoost软件包。 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 ). 我使用这篇有用的文章( http://www.picnet.com.au/blogs/guido/2016/09/22/xgboost-windows-x64-binaries-for-download/ )为python做到了这一点,并试图根据此问题将其安装在Anaconda中( Windows xgboost错误 )。 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? 不知何故,似乎命令“ python setup.py install”试图更改错误的目录(C:\\ Program Files ...而不是D:\\ Anaconda ...)。如何更改安装目录,以便进行更改提出他们应该在哪里?
try to activate the correct Anaconda in your console by executing the activate
script in the appropriate folder, eg: 尝试通过在相应文件夹中执行activate
脚本来activate
控制台中正确的Anaconda,例如:
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. 如果可行,您将在命令提示符下一行的前面看到(base)
。 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. 激活anaconda后,执行python
应该使用正确的可执行文件。 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? 这回答了你的问题了吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.