step1.
??去官網(wǎng)下載gurobi,網(wǎng)址:http://www.gurobi.com/downloads/gurobi-optimizer
用教育版郵箱注冊(cè),下載軟件并獲得license(一個(gè)序列號(hào)) Named-User Academic
step2:
??解壓下載的文件,命令如下:
tar xvfz gurobi8.1.0_linux64.tar.gz
step3:
??設(shè)置環(huán)境變量,在~/.bashrc中添加以下部分解幽,注意這部分"/home/hadoop/Downloads/"修改成自己的目錄
export GUROBI_HOME=/home/hadoop/Downloads/gurobi810/linux64
export PATH={GUROBI_HOME}/bin
export LD_LIBRARY_PATH={GUROBI_HOME}/lib
step4:
??在官網(wǎng)獲取授權(quán)的key(學(xué)生可以免費(fèi)得到)剪验,網(wǎng)址:https://user.gurobi.com/download/licenses/free-academic
step5:
??進(jìn)入解壓好的gurobi文件夾下,通過step3得到的key進(jìn)行激活
./gurobi810/linux64/bin/grbgetkey xxxxxxx //注意文件目錄,grbgetkey xxxxxxx則是通過step3得到的
step6:
驗(yàn)證是否成功燎孟,終端輸入
gurobi.sh
export GRB_LICENSE_FILE=/home/wust/license/gurobi.lic
gurobi.sh
Python 2.7.13 (default, Sep 4 2017, 15:40:17)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Academic license - for non-commercial use only
Gurobi Interactive Shell (linux64), Version 8.1.0
Copyright (c) 2018, Gurobi Optimization, LLC
Type "help()" for help
gurobi>