mikeyEcology / MLWIC

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

Setup problems/incompatible-conflict packages? #28

Closed MelissaSt closed 5 years ago

MelissaSt commented 5 years ago

Hello - I have been trying to setup and use MLWIC. I have followed and read through the issues and the windows help page by Nova-Scotia. At first it was problems with tensorflow so I tried to follow suggestions from the tensorflow issue sites (tried uploading CUDA, and following directions from there with nothing resolving) but now I am getting a bunch of errors. I can manage in R, I do not know python. Can anyone suggest any help for this. Thanks! See code:

CodeTrouble.docx

library(MLWIC) setup(python_loc = "C:/Users/szyman87/Anaconda3/")

Remove all packages in environment C:\Users\szyman87\ANACON~1\envs\r-reticulate:

Package Plan

environment location: C:\Users\szyman87\ANACON~1\envs\r-reticulate

The following packages will be REMOVED:

ca-certificates-2019.5.15-0 certifi-2019.6.16-py37_1 openssl-1.1.1c-he774522_1 pip-19.1.1-py37_0 python-3.7.3-h8c8aaf0_1 setuptools-41.0.1-py37_0 sqlite-3.29.0-he774522_0 vc-14.1-h0510ff6_4 vs2015_runtime-14.15.26706-h3a45250_4 wheel-0.33.4-py37_0 wincertstore-0.2-py37_0

Preparing transaction: ...working... done Verifying transaction: ...working... done Executing transaction: ...working... done Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... done

Package Plan

environment location: C:\Users\szyman87\ANACON~1\envs\r-reticulate

added / updated specs:

The following NEW packages will be INSTALLED:

ca-certificates pkgs/main/win-64::ca-certificates-2019.5.15-0 certifi pkgs/main/win-64::certifi-2019.6.16-py37_1 openssl pkgs/main/win-64::openssl-1.1.1c-he774522_1 pip pkgs/main/win-64::pip-19.1.1-py37_0 python pkgs/main/win-64::python-3.7.3-h8c8aaf0_1 setuptools pkgs/main/win-64::setuptools-41.0.1-py37_0 sqlite pkgs/main/win-64::sqlite-3.29.0-he774522_0 vc pkgs/main/win-64::vc-14.1-h0510ff6_4 vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.15.26706-h3a45250_4 wheel pkgs/main/win-64::wheel-0.33.4-py37_0 wincertstore pkgs/main/win-64::wincertstore-0.2-py37_0

Preparing transaction: ...working... done Verifying transaction: ...working... done Executing transaction: ...working... done #

To activate this environment, use

#

$ conda activate r-reticulate

#

To deactivate an active environment, use

#

$ conda deactivate

Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... failed Initial quick solve with frozen env failed. Unfreezing env and trying again. Solving environment: ...working... failed

UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:

If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Your current python version is (python=3.7). Note that conda will not change your python version to a different minor version unless you explicitly specify that.

The following specifications were found to be incompatible with each other:

Package kiwisolver conflicts for: matplotlib -> kiwisolver Package zlib conflicts for: matplotlib -> zlib[version='>=1.2.11,<1.3.0a0'] Package numpy conflicts for: tensorflow -> numpy[version='>=1.11.0|>=1.12.1|>=1.13.3'] matplotlib -> numpy[version='1.10.|1.11.'] scipy -> numpy[version='>=1.11.3,<2.0a0|>=1.15.1,<2.0a0'] Package html5lib conflicts for: tensorflow -> html5lib==0.9999999 Package libpng conflicts for: matplotlib -> libpng[version='>=1.6.21,<1.7|>=1.6.23,<1.7|>=1.6.32,<1.7.0a0|>=1.6.34,<1.7.0a0|>=1.6.35,<1.7.0a0|>=1.6.36,<1.7.0a0|>=1.6.37,<1.7.0a0'] Package blas conflicts for: scipy -> blas[version='|1.0',build=mkl] numpy -> blas[version='|1.0|1.1',build='mkl|mkl|openblas'] Package vc conflicts for: numpy -> vc[version='14.|9.|>=14,<15.0a0|>=14.1,<15.0a0'] python=3.7 -> vc[version='14.|>=14,<15.0a0|>=14.1,<15.0a0'] tornado -> vc[version='14.|9.|>=14.1,<15.0a0'] matplotlib -> vc[version='14.|9.|>=14.1,<15.0a0'] Package libcblas conflicts for: numpy -> libcblas[version='>=3.8.0,<4.0a0'] Package werkzeug conflicts for: tensorflow -> werkzeug[version='>=0.11.10'] Package libblas conflicts for: numpy -> libblas[version='>=3.8.0,<4.0a0'] Package libflang conflicts for: numpy -> libflang[version='>=5.0.0'] Package matplotlib-base conflicts for: matplotlib -> matplotlib-base[version='2.2.3|2.2.4|2.2.4|2.2.4|3.0.2|3.0.2|3.0.3|3.0.3|3.0.3|3.0.3|3.1.0|3.1.0|3.1.0|3.1.0|3.1.1|3.1.1|3.1.1|3.1.1',build='py37h2852a4a_1|py36h2852a4a_1|py37h3e3dc42_0|py36h2852a4a_1|py37h3e3dc42_1|py36h3e3dc42_1|py36h3e3dc42_0|py36h3e3dc42_1002|py37ha47f3eb_1|py36ha47f3eb_1|py27hf194043_1|py27he27c676_0|py36h2852a4a_0|py37h2852a4a_0|py37h3e3dc42_1002|py37h3e3dc42_0|py36h3e3dc42_0|py37h2852a4a_1|py36h2852a4a_0|py37h2852a4a_0'] Package numpy-base conflicts for: numpy -> numpy-base[version='1.11.3|1.14.3|1.14.3|1.14.3|1.14.4|1.14.4|1.14.4|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.6|1.14.6|1.14.6|1.14.6|1.15.0|1.15.0|1.15.0|1.15.0|1.15.1|1.15.1|1.15.1|1.15.1|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.3|1.15.3|1.15.3|1.15.4|1.15.4|1.15.4|1.15.4|1.15.4|1.15.4|1.16.0|1.16.0|1.16.0|1.16.0|1.16.0|1.16.0|1.16.1|1.16.1|1.16.1|1.16.1|1.16.1|1.16.1|1.16.2|1.16.2|1.16.2|1.16.3|1.16.3|1.16.3|1.16.4|1.16.4|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|>=1.9.3,<2.0a0',build='py37h5c71026_7|py37h5c71026_6|py36h5c71026_7|py36h5c71026_6|py35h5c71026_7|py27h0bb1d87_7|py27h0bb1d87_6|py37hc3f5095_0|py27hb1d0314_0|py27hb1d0314_1|py27hb1d0314_0|py37hc3f5095_0|py36hc3f5095_1|py27hb1d0314_1|py27hb1d0314_0|py37hc3f5095_0|py36h8128ebf_0|py27hb1d0314_0|py36h8128ebf_0|py36h8128ebf_0|py36h8128ebf_0|py37h4a99626_0|py36h4a99626_0|py27h2753ae9_4|py37h5c71026_1|py37h5c71026_0|py36h5c71026_4|py36h5c71026_3|py36h5c71026_1|py35h4a99626_4|py27h0bb1d87_4|py27h0bb1d87_3|py27h0bb1d87_1|py35h5c71026_0|py36h555522e_1|py35h555522e_1|py37hc3f5095_12|py37h8128ebf_9|py37h8128ebf_10|py37h5c71026_8|py37h5c71026_7|py37h2a9b21d_11|py36h8128ebf_9|py36h8128ebf_11|py36h8128ebf_10|py36h5c71026_8|py36h5c71026_7|py36h4a99626_9|py35h8128ebf_9|py35h8128ebf_10|py35h4a99626_9|py27hfef472a_9|py27hb1d0314_12|py27h2753ae9_9|py27h2753ae9_10|py27h0bb1d87_7|py27h0bb1d87_8|py27hb1d0314_11|py35h4a99626_8|py36h2a9b21d_11|py36hc3f5095_12|py37h4a99626_9|py37h8128ebf_11|py27h917549b_1|py27h0bb1d87_0|py36h5c71026_0|py27h0bb1d87_0|py27h0bb1d87_2|py35h5c71026_0|py36h5c71026_0|py36h5c71026_2|py37h5c71026_2|py37h5c71026_3|py37h5c71026_4|py35h8128ebf_4|py36h8128ebf_4|py37h8128ebf_4|py27hfef472a_0|py35h4a99626_0|py27h2753ae9_0|py35h8128ebf_0|py37h8128ebf_0|py27h2753ae9_0|py27h2753ae9_1|py35h8128ebf_0|py37h8128ebf_0|py27h2753ae9_0|py37h8128ebf_0|py27h2753ae9_0|py36hc3f5095_0|py37h8128ebf_0|py36hc3f5095_0|py37hc3f5095_1|py36hc3f5095_0|py36hc3f5095_1|py37hc3f5095_0|py37hc3f5095_1|py36hc3f5095_0|py37hc3f5095_0|py27hb1d0314_0|py36hc3f5095_0|py37hc3f5095_0|py36hc3f5095_0'] Package astor conflicts for: tensorflow -> astor[version='>=0.6.0'] Package bleach conflicts for: tensorflow -> bleach==1.5.0 Package icc_rt conflicts for: scipy -> icc_rt[version='>=13.1.6|>=16.0.4|>=2019.0.0'] numpy -> icc_rt[version='>=13.1.6|>=16.0.4|>=2019.0.0'] Package tensorboard conflicts for: tensorflow -> tensorboard[version='1.10.|1.9.|>=0.4.0rc1,<0.5.0|>=1.10.0,<1.11.0|>=1.11.0,<1.12.0|>=1.12.0,<1.13.0|>=1.13.0,<1.14.0|>=1.5.0,<1.6.0|>=1.6.0,<1.7.0|>=1.7.0,<1.8.0|>=1.8.0,<1.9.0|>=1.9.0,<1.10.0'] Package tensorflow-base conflicts for: tensorflow -> tensorflow-base[version='1.7.0|==1.10.0|==1.11.0|==1.11.0|==1.11.0|==1.12.0|==1.12.0|==1.12.0|==1.13.1|==1.13.1|==1.13.1|==1.13.1|==1.13.1|==1.13.1|==1.13.1|==1.13.1|1.7.1|1.8.0|==1.9.0|==1.9.0|==1.9.0|==1.9.0',build='gpu_py36h6e53903_0|mkl_py36hcaf7020_0|gpu_py37h871c8ca_0|gpu_py36h0fff12a_0|eigen_py37hf8af7b3_0|eigen_py36hf8af7b3_0|mkl_py36h81393da_0|gpu_py36h6e53903_0|mkl_py36h81393da_0|gpu_py36h6e53903_0|gpu_py36h6e53903_0|gpu_py35h6e53903_0|eigen_py35h45df0d8_0|eigen_py36h45df0d8_0|mkl_py35h81393da_0|mkl_py36h81393da_0|eigen_py36h45df0d8_0|eigen_py36h45df0d8_0|gpu_py36h871c8ca_0|gpu_py37h0fff12a_0|mkl_py37hcaf7020_0|eigen_py35h45df0d8_0|eigen_py36h45df0d8_0|gpu_py35h6e53903_0'] Package protobuf conflicts for: tensorflow -> protobuf[version='3.1.0|>=3.1.0|>=3.2.0|>=3.3.0|>=3.4.0|>=3.6.0'] Package sqlite conflicts for: python=3.7 -> sqlite[version='>=3.25.3,<4.0a0|>=3.26.0,<4.0a0|>=3.27.2,<4.0a0|>=3.28.0,<4.0a0'] Package openssl conflicts for: python=3.7 -> openssl[version='>=1.1.1a,<1.1.2a|>=1.1.1b,<1.1.2a'] Package _tflow_select conflicts for: tensorflow -> _tflow_select[version='==2.1.0|==2.2.0|==2.3.0',build='mkl|eigen|gpu'] Package python-dateutil conflicts for: matplotlib -> python-dateutil Package openblas conflicts for: numpy -> openblas[version='0.2.20|0.2.20.|>=0.2.20,<0.2.21.0a0|>=0.3.3,<0.3.4.0a0'] Package pip conflicts for: python=3.7 -> pip Package backports_abc conflicts for: tornado -> backports_abc[version='>=0.4'] Package termcolor conflicts for: tensorflow -> termcolor[version='>=1.1.0'] Package setuptools conflicts for: matplotlib -> setuptools Package pytz conflicts for: matplotlib -> pytz Package six conflicts for: tensorflow -> six[version='>=1.10.0'] cycler -> six Package mkl_random conflicts for: numpy -> mkl_random[version='>=1.0.2,<2.0a0'] Package gast conflicts for: tensorflow -> gast[version='>=0.2.0'] Package pyqt conflicts for: matplotlib -> pyqt[version='4.11.|5.|5.6.|5.9.|5.,>=5.9.2,<5.10.0a0|>=5.6,<6.0a0|>=5.6.0,<5.7.0a0|>=5.9.2,<5.10.0a0'] Package ssl_match_hostname conflicts for: tornado -> ssl_match_hostname Package tornado conflicts for: matplotlib -> tornado Package certifi conflicts for: tornado -> certifi Package singledispatch conflicts for: tornado -> singledispatch Package mkl-service conflicts for: scipy -> mkl-service[version='>=2,<3.0a0'] Package liblapack conflicts for: numpy -> liblapack[version='>=3.8.0,<3.9.0a0'] Package grpcio conflicts for: tensorflow -> grpcio[version='>=1.8.6'] Package mkl conflicts for: scipy -> mkl[version='>=2018.0.0,<2019.0a0|>=2018.0.2,<2019.0a0|>=2018.0.3,<2019.0a0|>=2019.1,<2020.0a0|>=2019.4,<2020.0a0'] numpy -> mkl[version='>=2018.0.0,<2019.0a0|>=2018.0.1,<2019.0a0|>=2018.0.2,<2019.0a0|>=2018.0.3,<2019.0a0|>=2019.1,<2020.0a0|>=2019.3,<2020.0a0'] Package pyparsing conflicts for: matplotlib -> pyparsing Package mock conflicts for: tensorflow -> mock[version='>=2.0.0'] Package absl-py conflicts for: tensorflow -> absl-py[version='>=0.1.6'] Package conflicts for: numpy -> [track_features=blas_openblas] Package freetype conflicts for: matplotlib -> freetype[version='2.6.|>=2.8,<2.9.0a0|>=2.9.1,<3.0a0'] Package futures conflicts for: tornado -> futures Package backports.weakref conflicts for: tensorflow -> backports.weakref[version='1.0rc1|>=1.0rc1'] Package backports.functools_lru_cache conflicts for: matplotlib -> backports.functools_lru_cache Package cycler conflicts for: matplotlib -> cycler[version='>=0.10'] Package functools32 conflicts for: matplotlib -> functools32 Package markdown conflicts for: tensorflow -> markdown[version='>=2.6.8'] Package mkl_fft conflicts for: numpy -> mkl_fft[version='>=1.0.4|>=1.0.6,<2.0a0']

Error: Error 1 occurred installing packages into conda environment r-reticulate

classify(

  • path_prefix = "D:/Analysis/R_Tagging/L1/images",
  • data_info = "D:/Analysis/R_Tagging/L1/data_info.csv",
  • model_dir = "D:/Analysis/R_Tagging", #not working so i set it myself with setwd()
  • python_loc = "C:/Users/szyman87/Anaconda3/", # remember to include the last slash
  • save_predictions = "model_predictions.txt"
  • ) /Rtools/bin/cp: 'D:/Analysis/R_Tagging/L1/data_info.csv' and 'D:/Analysis/R_Tagging/L1/data_info.csv' are the same file Traceback (most recent call last): File "C:\Users\szyman87\ANACON~1\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\szyman87\ANACON~1\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\szyman87\ANACON~1\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\szyman87\ANACON~1\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Users\szyman87\ANACON~1\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "eval.py", line 13, in import tensorflow as tf File "C:\Users\szyman87\ANACON~1\lib\site-packages\tensorflow__init__.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\szyman87\ANACON~1\lib\site-packages\tensorflow\python__init__.py", line 49, in from tensorflow.python import pywrap_tensorflow File "C:\Users\szyman87\ANACON~1\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Users\szyman87\ANACON~1\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\szyman87\ANACON~1\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\szyman87\ANACON~1\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\szyman87\ANACON~1\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Users\szyman87\ANACON~1\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found.

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace above this error message when asking for help. [1] "evaluation of images took 0.693399906158447 secs. The results are stored in D:/Analysis/R_Tagging/L1/model_predictions.txt. To view the results in a viewer-friendly format, please use the function make_output"

mikeyEcology commented 5 years ago

Can you try first renaming this file D:/Analysis/R_Tagging/L1/data_info.csv to something else and then re-running? But I don't think this is the problem. It looks like tensorflow might not have installed properly on your machine. It looks like you are using Windows and this OS introduces problems for software like this. Unfortunately, each Windows machine is different, so many software developers avoid optimizing software for these computers. Did you try visiting the link they provided to see if you could find some help there?

MelissaSt commented 5 years ago

Hi, thanks for the reply. renaming the folder did not help but I did redo TensorFlow again. Right now following the windows help link, when you download TensorFlow it tells you to use the 3.6 version. I ended up uninstalling and reinstalling everything a few times and now figured out that you need to use anaconda navigator and update TensorFlow, cuda toolkit, and the other required packages to the newest versions for everything to work properly (at least using my Windows 7 computer).