Cannot import open3d on Windows laptop #7429
-
|
Started getting an error running an open3d Python script on a Windows laptop with integrated graphics...works fine on a NVidia-equiped desktop, worked on same laptop literally an hour ago. Using Win11, python 3.12.10, open3d 0.19.0. Uninstalled and reinstalled (using pip) open3d and numpy, no change. As it turns out, it's dying during the open3d import: I have no clue what this means: most similar stuff found in searches involve things done wrong during open3d build-from-source exercises, which is not the case here. (Will try reinstalling python itself while I'm waiting...) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Ok, uninstalled python, reinstalled...same symptoms. Uninstalled python again. |
Beta Was this translation helpful? Give feedback.
-
|
As per ChatGPT: This is almost certainly a name-shadowing + circular import problem caused by this file in the working directory:
Here’s what happens:
Fix (do this)
Quick confirmation testFrom that same folder, run: python -c "import threading; print(threading.__file__)"
General rule (to avoid this forever)Don’t name your own files the same as standard library modules ( |
Beta Was this translation helpful? Give feedback.
As per ChatGPT:
This is almost certainly a name-shadowing + circular import problem caused by this file in the working directory:
A:\3D\Scanner\Orient\threading.pyHere’s what happens:
open3d→ importsctypes.util→ importssubprocess→ imports Python stdlibthreadingthreading, it imports yourA:\3D\Scanner\Orient\threading.pythreading.pyimmediately importsopen3d.visualization.gui, which re-entersopen3dwhile it’s still importingopen3dis only “partially initialized”, so attributes like__DEVICE_API__aren’t set yet → you get the error you see.Fix (do this)
Rename
A:\3D\Scanner\Orient\threading.py…