Issue
I am using Python with VSCode (Ubuntu). I installed Python-mip, and it is running within the terminal. However, VSCode is not finding the library mip (from Python-mip).
For example, I am calling: from mip import Model, xsum, maximize, BINARY
to import some required classes and definitions from Python-MIP and the VSCode is returning:ModuleNotFoundError: No module named 'mip'
. How could I proceed?
Solution
You need to pay attention to two points:
Select the interpreter with
mip
installed (Ctrl+Shift+P -->Python: Select Interpreter
)The interpreter version you choose will be displayed in the lower right corner of the vscode interface.
Execute script using
Run Python File
Answered By - JialeDu Answer Checked By - Terry (WPSolving Volunteer)