Though I've already install Cplex, and could import cplex in Jupyter Notebook.
When I use "cplex.infinity", error arises and it says "module 'cplex' has no attribute 'infinity'"
I don't know the reason, hoping you could help me.
This is because virtual environments in Jupyter are different.If you don't tell your Jupiter kernel which environment it should use it won't use your environment from python terminal (even launching the jupyter notebook
command with this virtual environment activated).
You can follow this guide .
Basically:
You will have then all the dependencies installed in your virtual environment available from Jupyter.
Cheers!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.