- 下载压缩文件SCIP,并确保对下载的版本有明确的支持(在我的情况下为developers.google.com/optimization/support/release_notes#support-for-scip-6.0.0)并解压缩。
- 下载GLPK(发布最新版本4.65时)并解压缩。
- 安装SCIP命令
make GMP=false READLINE=false TPI=tny ZIMPL=false scipoptlib install INSTALLDIR=<path>/scipoptsuite-6.0.0
- 使用以下命令安装GLPK:
./configure --prefix=<install_path> --with-pic --enable-shared
make
make install
- 从github下载OR-Tools
git clone https://github.com/google/or-tools
- 使用以下命令安装OR-Tools:
make third_party
make python_package
如果最后一个命令不起作用,请使用以下命令安装wheel:
pip install wheel
- 要激活虚拟环境,请转到带有Python软件包的文件夹,然后从那里安装它。
如果您不需要在虚拟环境中安装,而是在整个系统的全局安装,则:
make python_package
执行命令:
make python