scikit-learn .libs directory error
See original GitHub issueThe execution of the code listed below result in this error:
Traceback (most recent call last):
File "D:\_DEV\BRANCH\C-LINK~1.0_L\C-2BEA~1\MAIN~1.DIS\main.py", line 5, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "D:\_DEV\BRANCH\C-LINK~1.0_L\C-2BEA~1\MAIN~1.DIS\plotter.py", line 5, in <module plotter>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "D:\_DEV\BRANCH\C-LINK~1.0_L\C-2BEA~1\MAIN~1.DIS\sklearn\__init__.py", line 80, in <module sklearn>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "D:\_DEV\BRANCH\C-LINK~1.0_L\C-2BEA~1\MAIN~1.DIS\sklearn\_distributor_init.py", line 23, in <module sklearn._distributor_init>
File "D:\_DEV\BRANCH\C-LINK~1.0_L\C-2BEA~1\MAIN~1.DIS\ctypes\__init__.py", line 374, in __init__
FileNotFoundError: Could not find module 'D:\_DEV\BRANCH\C-LINK~1.0_L\C-2BEA~1\MAIN~1.DIS\sklearn\.libs\vcomp140.dll' (or one of its dependencies). Try using the full path with constructor syntax.
The error message refer to a missing dll named vcomp140.dll
but the entire sklearn\.lib
directory is missing from the dist directory.
I have tried to add manually the .libs directory from C:\Python39\Lib\site-packages\sklearn\.libs
in main.dist\sklearn
but when i run main.exe again it does not print nothing in stdout and the program exits immediatly .
0.7.7 Commercial: None Python: 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] Flavor: Unknown Executable: C:\Python39\python.exe OS: Windows Arch: x86_64 WindowsRelease: 10
I installed from https://www.python.org/downloads/
I use pip and i dont use any virtual enviroment. Pip version: pip 22.0.4 from c:\python39\lib\site-packages\pip (python 3.9)
Some pip package version: numpy==1.22.3 pandas==1.4.1 scikit-learn==1.0.2 scipy==1.8.0 xgboost==1.6.0 imbalanced-learn==0.9.0
- Short code example
from operator import index
import pandas as pd
from sklearn.ensemble import RandomForestClassifier,GradientBoostingClassifier,AdaBoostClassifier
from sklearn.svm import LinearSVC
from sklearn.model_selection import train_test_split as sklearn_train_test_split,GroupShuffleSplit
from imblearn.over_sampling import RandomOverSampler, SMOTE
from imblearn.under_sampling import RandomUnderSampler
from imblearn.combine import SMOTETomek, SMOTEENN
from collections import Counter
from imblearn.ensemble import BalancedRandomForestClassifier
from numpy import zeros
from xgboost import XGBClassifier
print("Hello world")
- Nuitka options used
python -m nuitka --enable-plugin=numpy --standalone main.py
EDIT
After i copy the .libs directory in the dist path and try to debug the EXE with Visual Studio, i obtain this exception: Exception thrown at 0x00007FF76265EA03 in main.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
This is fixed in the current 0.8 release.
@interseba5 posting below closed issues is a surefire way of getting ignored, this time I am pointing out the duplicate #1565