import numpy
print "asdf"
When I try to debug/run the above Python code in Visual Studio Code I get the following error (Using OSX)
ImportError, cannot import name float96
What is the resolution ?
I have installed python from the python website. Tried to run after installing from brew too but no effect.
EDIT
The problem is with all imports for Visual Studio
In my case, the problem was that vscode was using the python (v2) interpreter but I had installed the module using python3.
I fixed this modifying the launch.json file and specifying the pythonPath for python3, as explained here.
this is an issue with the debugger, in the manner in which it loads the modules and such import errors can be safely ignored. To ignore these errors, please go into the launch.json file and edit it as follows (to add the section to ignore the "ImportError"):
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"program": "${file}",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
],
"exceptionHandling": {
"ignore": ["ImportError"]
}
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With