作者注:包括在max os和ubuntu上安装Mosek。无参考价值,个人备忘。
1. Mosek简介
请参考Mosek官网:Mosek Aps
2. 安装步骤:
⚠️If MOSEK is not only used from Python, 请参考官网教程。
1. pip 安装
pip install -f https://download.mosek.com/stable/wheel/index.html Mosek --user
如果这个过程没有问题,会显示:
Successfully installed mosey-版本号
⚠️pip 是什么版本,就使用什么版本的python导入mosek模块。举个例子:
我在服务器sever1中使用的是python2.7和pip这一套,按照上述命令安装mosek之后,import mosey.fusion时告诉我没有安装numpy,这是我使用命令:
pip install numpy
安装numpy。但是在server2中使用的是python3.5和pip3这一套,则使用指令:
pip3 install -f https://download.mosek.com/stable/wheel/index.html Mosek --user
安装mosek之后,import mosey.fusion时告诉我没有安装numpy,这是我使用命令:
pip3 install bumpy
安装numpy。使用指令:
sudo apt-get install python-numpy
安装numpy就不行。未知原因:(
2. Set up a license. See the Licensing guide for instructions.
UNIX系统,将mosek.lic放在:
$HOME/mosek/mosek.lic
注意:这里的HOME
指的是/root
If the folder mosek
in the home directory does not exists, then it should be created. The license can be tested with the program msktestlic
. For further information about the license system, and other non-standard ways of setting up the license, please consult the License Guide.:
网友评论