Conda install resultings in missing albumentations dependenccy
Install using standard conda approach:
conda create -n deepforest python=3
conda activate deepforest
conda install -c conda-forge deepforest
Then do some basic stuff. I ran this, not sure exact failure point:
from deepforest import main
from deepforest import get_data
model = main.deepforest()
model.use_release()
raster_path = get_data("OSBS_029.tif")
predicted_raster = model.predict_tile(raster_path, return_plot = True, patch_size=300, patch_overlap=0.25)
Traceback (most recent call last):
File "/blue/ewhite/everglades/EvergladesTools/Zooniverse/dup_reprex.py", line 1, in <module>
from deepforest import main
File "/blue/ewhite/ethanwhite/miniconda3/envs/DeepForest/lib/python3.12/site-packages/deepforest/main.py", line 13, in <module>
from deepforest import dataset
File "/blue/ewhite/ethanwhite/miniconda3/envs/DeepForest/lib/python3.12/site-packages/deepforest/dataset.py", line 19, in <module>
import albumentations as A
ModuleNotFoundError: No module named 'albumentations'
It seems like the albumentations library is missing in environment.
Install the albumentations library using conda by
conda install -c conda-forge albumentations
or,
Alternatively, you can install it using pip
pip install albumentations
Thanks @Abhishek-kumar0503. I understand why the error is happening. This issue is a (not very clearly phrased) request to make sure that we include albumentations in the dependencies for the conda package (or figure out why it isn't getting installed if it is already there).
okay thanks@ethanwhite . This year i want to contributed in gsoc and much interested in this organization. Could would help me to review my proposal and select me.
I think proposals are due in a couple of hours right? I can try to take a quick look if you post a link, but the most important thing is definitely to get the proposal in by the deadline so if you don't here from me definitely go ahead and submit. I don't know what the outcome of the selection process will be, but the thing you control is getting the proposal submitted.
I installed the albumentations library after getting the same error, but after installing it using conda forge I get a brand new error that I'm not sure how to resolve:
>>> from deepforest import main
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/priyapatel/miniconda3/envs/deepforest2/lib/python3.12/site-packages/deepforest/main.py", line 13, in <module>
from deepforest import dataset
File "/Users/priyapatel/miniconda3/envs/deepforest2/lib/python3.12/site-packages/deepforest/dataset.py", line 19, in <module>
import albumentations as A
File "/Users/priyapatel/miniconda3/envs/deepforest2/lib/python3.12/site-packages/albumentations/__init__.py", line 3, in <module>
from .augmentations import *
File "/Users/priyapatel/miniconda3/envs/deepforest2/lib/python3.12/site-packages/albumentations/augmentations/__init__.py", line 2, in <module>
from .blur.functional import *
File "/Users/priyapatel/miniconda3/envs/deepforest2/lib/python3.12/site-packages/albumentations/augmentations/blur/__init__.py", line 1, in <module>
from .functional import *
File "/Users/priyapatel/miniconda3/envs/deepforest2/lib/python3.12/site-packages/albumentations/augmentations/blur/functional.py", line 5, in <module>
import cv2
ImportError: dlopen(/Users/priyapatel/miniconda3/envs/deepforest2/lib/python3.12/site-packages/cv2.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/liblapack.3.dylib
Referenced from: <D72585C4-ABED-385E-9E90-33B0402E51A1> /Users/priyapatel/miniconda3/envs/deepforest2/lib/libopencv_core.4.9.0.dylib
Reason: tried: '/Users/priyapatel/miniconda3/envs/deepforest2/lib/liblapack.3.dylib' (no such file), '/Users/priyapatel/miniconda3/envs/deepforest2/lib/liblapack.3.dylib' (no such file), '/Users/priyapatel/miniconda3/envs/deepforest2/lib/python3.12/site-packages/../../liblapack.3.dylib' (no such file), '/Users/priyapatel/miniconda3/envs/deepforest2/lib/python3.12/site-packages/../../liblapack.3.dylib' (no such file), '/Users/priyapatel/miniconda3/envs/deepforest2/bin/../lib/liblapack.3.dylib' (no such file), '/Users/priyapatel/miniconda3/envs/deepforest2/bin/../lib/liblapack.3.dylib' (no such file), '/usr/local/lib/liblapack.3.dylib' (no such file), '/usr/lib/liblapack.3.dylib' (no such file, not in dyld cache)
Any thoughts on how to resolve this?
Hi @priyapatel1 - thanks for reporting. Can you open a new issue for this so that we can keep the discussions separate.
Looks like this issue is due to the version of deepforest that gets installed in Python 3.12 by conda. It installs 1.1.3 not the new version 1.3.3. That is an issue, but it isn't this one, so closing.