mikeyEcology / MLWIC

Machine Learning for Wildlife Image Classification
70 stars 16 forks source link

setup failure connection #22

Closed pirocha closed 5 years ago

pirocha commented 5 years ago

Hi! I'm trying to setup MLWIC in my windows machine and I'm having troubles when I try to setup. Apparently, it can't connect the Anaconda repository. I have followed previous issues trying to sort out this problem, but no success. Input:

setup(python_loc = "C:/Users/piroc/Anaconda3/")

Output: Collecting package metadata: ...working... failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://repo.anaconda.com/pkgs/free/noarch/repodata.json.bz2 Elapsed: -

An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way.

If your current network has https://www.anaconda.com blocked, please file a support request with your network engineering team.

SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/free/noarch/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))

Error: Error 1 occurred creating conda environment r-reticulate

Can you tell me what am I doing wrong? Thank you, Filipe

mikeyEcology commented 5 years ago

This means that you have either not installed Anaconda properly or that Python is located in a further subdirectory of the one you are specifying. You also might need to specify the location of conda (conda_loc), which will be in a location close to Python (under Anaconda3) on your computer. Windows introduces a lot of complications for computation, and it would be worth checking out this tutorial to deal with these.

pirocha commented 5 years ago

Hi! I think I have solved the first issue however, another appeared. I followed the tutorial you sent (thank you!) and was able to install to setup python, and only the acceptable error "Error: Error 1 occurred installing packages into conda environment r-reticulate" appears. However when the classify function still doesn't work, apparently with a problem in the import:

classify(
        path_prefix = "D:/CameraTrap/MLWIC_examples-master/images/",  
    data_info = "D:/CameraTrap/L1/data_info.csv", 
    model_dir = "D:/CameraTrap/", 
    python_loc = "C:/Users/piroc/Anaconda3/", # remember to include the last slash
    save_predictions = "model_predictions.txt" 
)

Traceback (most recent call last): File "eval.py", line 12, in import numpy as np File "C:\Users\piroc\ANACON~1\lib\site-packages\numpy__init__.py", line 140, in from . import _distributor_init File "C:\Users\piroc\ANACON~1\lib\site-packages\numpy_distributor_init.py", line 34, in from . import _mklinit ImportError: DLL load failed: Impossible to locate the specified module. [1] "evaluation of images took 0.114691972732544 secs. The results are stored in D:/CameraTrap//L1/model_predictions.txt. To view the results in a viewer-friendly format, please use the function make_output"

Can you help me with this? Thank you!

mikeyEcology commented 5 years ago

It looks like numpy is not installing properly on your machine for some reason. The setup function is designed so that you don't have to install python packages manually, but it might be that you have to in your case. Can you try installing numpy using pip following the directions here. It is kind of a pain, but hopefully it will solve your problem.

pirocha commented 5 years ago

Hi @mikeyEcology, I finally managed to run the classify function in my PC. In the end, I think it was only a problem of packages' versions. Thank you!