ImportError in JupyterLab, but works in Spyder and command line
Hi,
I was trying the command from gurobipy import * in JupyterLab, but it showed the following message
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-1-63cdd5112d6e> in <module> ----> 1 from gurobipy import * D:\Anaconda2\envs\py3\lib\site-packages\gurobipy\__init__.py in <module> ----> 1 from .gurobipy import * ImportError: DLL load failed: 找不到指定的模块。
Then I tried it in command line and spyder. This import works. I tried to output sys.executable and sys.path for JupyterLab and command line. They are identical.
I was wondering why it works for spyder and command line, but does not work in jupyterlab and jupyter notebook.
Thanks,
Wenyu
0
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Are you using the same conda environment for Jupyter, Spyder and the command line? It appears that there is an issue with the library path.
Can you try to re-install Jupyter in your environment?
0
Post is closed for comments.
Comments
2 comments