简体   繁体   English

如何在Jupyter笔记本中导入CPLEX?

[英]How can I import CPLEX in Jupyter notebook?

I am new to Python and Jupyter notebook. 我是Python和Jupyter笔记本的新手。 I am using Windows 10. 我正在使用Windows 10。

I already installed Anaconda3 and tried to import cplex in Jupyter notebook environment. 我已经安装了Anaconda3,并尝试在Jupyter笔记本环境中导入cplex。
But I only got the below error: 但是我只有以下错误:

ModuleNotFoundError: No Module named 'cplex' ModuleNotFoundError:没有名为“ cplex”的模块

错误

I did find some resolutions for that, but neither of them fixed the problem. 我确实找到了一些解决方案,但是都没有解决问题。

I think I have to set path or install something for using the CPLEX in Jupyetr notebook, but I cannot find how I do that. 我认为我必须设置路径或安装一些文件才能在Jupyetr笔记本电脑中使用CPLEX,但是我找不到如何做到这一点。

You should have a look at https://www.ibm.com/support/knowledgecenter/SSSA5P_12.8.0/ilog.odms.cplex.help/CPLEX/GettingStarted/topics/set_up/Python_setup.html 您应该看看https://www.ibm.com/support/knowledgecenter/SSSA5P_12.8.0/ilog.odms.cplex.help/CPLEX/GettingStarted/topics/set_up/Python_setup.html

在此处输入图片说明

You could use the Docplex api: http://ibmdecisionoptimization.github.io/docplex-doc/mp/getting_started_python.html 您可以使用Docplex api: http ://ibmdecisionoptimization.github.io/docplex-doc/mp/getting_started_python.html

You could even start without installing cplex on your machine. 您甚至可以在没有在计算机上安装cplex的情况下开始使用。 (But call cplex in the cloud https://developer.ibm.com/docloud/try-docloud-free/ ) (但是请在云中调用cplex https://developer.ibm.com/docloud/try-docloud-free/

And you could also use docplex in Watson Studio: https://dataplatform.cloud.ibm.com/docs/content/DO/DOcplex.html 您还可以在Watson Studio中使用docplex: https ://dataplatform.cloud.ibm.com/docs/content/DO/DOcplex.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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