mikeyEcology / MLWIC2

Classify camera trap images using machine learning with R Shiny Apps
36 stars 17 forks source link

DLL Load Fail #30

Open eruraweth opened 2 years ago

eruraweth commented 2 years ago

Hi all,

I'm running this package and learning Anaconda/python for the first time. And am struggling with this error.

classify(pathprefix = "C:/Users/bird/Desktop/C7_07162019", datainfo = "C:/Users/bird/Desktop/image_labels.csv", modeldir ="C:/Users/bird/Desktop/MLWIC2_helper_files", pythonloc = "C:/Users/bird/anaconda3/envs/enviro", save_predictions = "model_predictions.txt", architecture = 'resnet', depth = 18, top_n = 5, batch_size = 128, make_output = TRUE, output_name = "MLWIC2_output.csv", num_cores = 16, os="Windows", num_classes=1000 )

Your data_info file exists: C:/Users/bird_/Desktop/image_labels.csv. Your `pathprefix exists: C:/Users/bird/Desktop/C707162019. You are running on a Windows computer. Traceback (most recent call last): File "run.py", line 14, in import numpy as np File "C:\Users\bird\ANACON~1\envs\enviro\lib\site-packages\numpy__init__.py", line 140, in from . import _distributorinit File "C:\Users\bird\ANACON~1\envs\enviro\lib\site-packages\numpy_distributor_init.py", line 34, in from . import _mklinit ImportError: DLL load failed: The specified module could not be found. The classify function did not run properly.

I'm running it in an Anaconda environment with python 3.7, with numpy 1.16.0 (tried 1.16.4 too), and tensorflow 1.14.0.

I have reinstalled and updated Microsoft Visual C++, I have manually added msvcp71.dll into the system files and into the DLL file under anaconda3. I have tried adding to the PATH ~/Library/bin, I have uninstalled and reinstalled numpy. I am running out of options that already exist on the internet. Can anyone help???

TIA!!

@mikeyEcology

bghogan commented 1 year ago

Just got over the same problem. For me, it was that the python.exe in the environment being used by R Studio, and the one being used by the anaconda prompt were different (or something like that anyway).

If you open anaconda prompt, and go to the r-reticulate environment ('activate r-reticulate') and type 'where python' - do you see an entry of python.exe other than the r-reticulate one? I did (in windows apps) which on being deleted fixed the issue after updating numpy again.

Edit: just realized how old this problem was - sorry for zombie posting, only just started trying this library out.