dddjjjbbb / Grunz

"Grunz" aims to streamline the pre/post processing of camera trap data via MegaDetector. The code was written to aid the work of the Institut für Ökologie at the Technische Universität Berlin.
GNU General Public License v2.0
5 stars 2 forks source link

Programatically add /ai4eutils and /camertraps to user's PYTHONPATH #1

Open dddjjjbbb opened 4 years ago

dddjjjbbb commented 4 years ago

As we're importing this code as a submodule in main, we are running into import errors without first modifying paths in the two respective submodules. Fortunately it should easily be solved by programmatically adding these two directories to the end user's PYTHONPATH at runtime. Without doing so this issue will re occur every time we pull from upstream.

robinsandfort commented 3 years ago

Hi, I changed the three "from cameratraps.ct_utils import truncate_float import cameratraps.visualization.visualization_utils as viz_utils" but still run into ModuleNotFoundError: No module named "tensorslow". I run tensorflow 1.15.0 on a raspberry. Cheers Robin

dddjjjbbb commented 3 years ago

Hi @robinsandfort, thanks for this. If you could send me the full stack trace I can better understand what's failing your side. Thanks :)

robinsandfort commented 3 years ago

python main.py --pre "grunz/data" Traceback (most recent call last): File "main.py", line 8, in from cameratraps.detection.run_tf_detector_batch import ( File "/home/pi/tf_cam/Grunz/cameratraps/detection/run_tf_detector_batch.py", line 49, in from cameratraps.detection.run_tf_detector import ImagePathUtils, TFDetector File "/home/pi/tf_cam/Grunz/cameratraps/detection/run_tf_detector.py", line 67, in import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow'