You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not too familiar with this project, but I stumbled on this error when importing sklearn. The traceback reported the cause to be the following exception, where I have shortened the filepath for readability.
FileNotFoundError: Could not find module '...\site-packages\numpy.libs\libopenblas64__v0.3.23-293-gc2f4bdbb-gcc_10_3_0-2bde3a66a51006b2b53eb3' (or one of its dependencies). Try using the full path with constructor syntax.
The exception is triggered by _make_controller_from_path(filepath). The root cause is that the file path is truncated during the library discovery process. The actual file name is libopenblas64__v0.3.23-293-gc2f4bdbb-gcc_10_3_0-2bde3a66a51006b2b53eb373ff767a3f.dll. Truncation occurs because of the use of MAX_PATH, which is 260, in the line below.
The error is resolved if I monkey-patch the above line to use MAX_PATH*2. An exacerbating factor is that I'm building my project using Bazel, which creates hermetic builds by playing a bunch of tricks with sandboxed and super-long path names. I can think of some simple work arounds and sanity checks.
If the returned path is exactly MAX_PATH length, double the buffer size and call GetModuleFileNameExW again.
Check that the returned path exists on the system. If not, double the buffer size and call GetModuleFileNameExW again.
The text was updated successfully, but these errors were encountered:
I'm not too familiar with this project, but I stumbled on this error when importing sklearn. The traceback reported the cause to be the following exception, where I have shortened the filepath for readability.
FileNotFoundError: Could not find module '...\site-packages\numpy.libs\libopenblas64__v0.3.23-293-gc2f4bdbb-gcc_10_3_0-2bde3a66a51006b2b53eb3' (or one of its dependencies). Try using the full path with constructor syntax.
The exception is triggered by
_make_controller_from_path(filepath)
. The root cause is that the file path is truncated during the library discovery process. The actual file name islibopenblas64__v0.3.23-293-gc2f4bdbb-gcc_10_3_0-2bde3a66a51006b2b53eb373ff767a3f.dll
. Truncation occurs because of the use ofMAX_PATH
, which is 260, in the line below.threadpoolctl/threadpoolctl.py
Line 1089 in 7eff7eb
The error is resolved if I monkey-patch the above line to use MAX_PATH*2. An exacerbating factor is that I'm building my project using Bazel, which creates hermetic builds by playing a bunch of tricks with sandboxed and super-long path names. I can think of some simple work arounds and sanity checks.
The text was updated successfully, but these errors were encountered: