Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issue when running base model on images #692

Closed
Diego-asutralgis opened this issue Jun 18, 2024 · 12 comments
Closed

Compatibility issue when running base model on images #692

Diego-asutralgis opened this issue Jun 18, 2024 · 12 comments

Comments

@Diego-asutralgis
Copy link

Diego-asutralgis commented Jun 18, 2024

The code runs well when ussing Deepforest 1.1, when uprgading to 1.3.3 ussing a virtual enviroment it starts returning a compatibility problem, the torch and torchvision versions are compatible acording to the official webpage

**Environment

  • OS: windows 10
  • Python version and environment : 3.11.9 conda VE with DeepForest 1.3.3

Screenshots and Context

Cell In[1], [line 24](vscode-notebook-cell:?execution_count=1&line=24)
     [21](vscode-notebook-cell:?execution_count=1&line=21) model.use_release()
     [23](vscode-notebook-cell:?execution_count=1&line=23) sample_image_path = r"C:\Users\zer0a\OneDrive\Escritorio\Test/Prueba3.png"
---> [24](vscode-notebook-cell:?execution_count=1&line=24) img = model.predict_image(path=sample_image_path, return_plot=True)
     [26](vscode-notebook-cell:?execution_count=1&line=26) #predict_image returns plot in BlueGreenRed (opencv style), but matplotlib likes RedGreenBlue, switch the channel order. Many functions in deepforest will automatically perform this flip for you and give a warning.
     [27](vscode-notebook-cell:?execution_count=1&line=27) plt.imshow(img[:,:,::-1])

File c:\Users\zer0a\miniconda3\envs\DiegoTest\Lib\site-packages\deepforest\main.py:347, in deepforest.predict_image(self, image, path, return_plot, color, thickness)
    [344](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:344) image = torch.tensor(image, device=self.device).permute(2, 0, 1)
    [345](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:345) image = image / 255
--> [347](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:347) result = predict._predict_image_(model=self.model,
    [348](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:348)                                  image=image,
    [349](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:349)                                  path=path,
    [350](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:350)                                  nms_thresh=self.config["nms_thresh"],
    [351](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:351)                                  return_plot=return_plot,
    [352](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:352)                                  thickness=thickness,
    [353](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:353)                                  color=color)
    [355](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:355) if return_plot:
    [356](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/main.py:356)     return result

File c:\Users\zer0a\miniconda3\envs\DiegoTest\Lib\site-packages\deepforest\predict.py:38, in _predict_image_(model, image, path, nms_thresh, return_plot, thickness, color)
     [23](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/predict.py:23) """Predict a single image with a deepforest model
     [24](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/deepforest/predict.py:24)         
...
     [54](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/torchvision/extension.py:54)             "version with torchvision.__version__ and verify if they are compatible, and if not "
     [55](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/torchvision/extension.py:55)             "please reinstall torchvision so that it matches your PyTorch install."
     [56](file:///C:/Users/zer0a/miniconda3/envs/DiegoTest/Lib/site-packages/torchvision/extension.py:56)         )

RuntimeError: Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check https://github.com/pytorch/vision#installation for the compatibility matrix. Please check your PyTorch version with torch.__version__ and your torchvision version with torchvision.__version__ and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.

User Story

“As a student Im working on a school project”

@bw4sz
Copy link
Collaborator

bw4sz commented Jun 24, 2024

This issue is upstream of deepforest. Can you make a new env and reinstall?

@bw4sz bw4sz added the Awaiting author contribution Waiting on the issue author to do something before proceeding label Jun 24, 2024
@github-actions github-actions bot removed the Awaiting author contribution Waiting on the issue author to do something before proceeding label Jun 24, 2024
@bw4sz bw4sz added the Awaiting author contribution Waiting on the issue author to do something before proceeding label Jun 24, 2024
@Diego-asutralgis
Copy link
Author

I already did, maybe its an issue with the versions of pytorch and torchvision, now the error runs in the IoU call from DeepForest main.py, it asks for version 0.8 or newer, wich i have

@github-actions github-actions bot removed the Awaiting author contribution Waiting on the issue author to do something before proceeding label Jun 24, 2024
@bw4sz
Copy link
Collaborator

bw4sz commented Jun 24, 2024

You'll need to show full and reproducible logs for me to help, to much to guess at.

@Diego-asutralgis
Copy link
Author

Diego-asutralgis commented Jun 25, 2024

Created a VE with python 3.11.9

conda install pytorch torchvision -c pytorch
conda install deepforest=1.3.3 -c conda-forge (this was done beacuse if not specified it would install DeepForest 1.1.3)

Run the "Getting started demo" from the readthedocs DeepForest page, after I run the code I get the compatibility error previously mentioned

snipet of the code:

import deepforest
from deepforest import main
from deepforest import get_data
import matplotlib.pyplot as plt

model = main.deepforest()
model.use_release()

sample_image_path = r"C:\Users\zer0a\OneDrive\Escritorio\DiegoTrees\TIF\Prueba3.png"
img = model.predict_image(path=sample_image_path, return_plot=True)
plt.imshow(img[:,:,::-1])

RuntimeError: Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check https://github.com/pytorch/vision#installation for the compatibility matrix. Please check your PyTorch version with torch.version and your torchvision version with torchvision.version and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

@bw4sz
Copy link
Collaborator

bw4sz commented Jun 25, 2024

Start with pip install DeepForest and let's see. Conda installs are getting weaker and weaker, hard to mantain. (@henrykironde)

@bw4sz
Copy link
Collaborator

bw4sz commented Jun 25, 2024

@henrykironde I start to wonder whether we should drop conda support. Its just not worth it? @ethanwhite.

@Diego-asutralgis
Copy link
Author

Diego-asutralgis commented Jun 27, 2024

Hi, I tried using a pip install, but it keeps outputing errors once I run the code, this time with lightning, after running the same code shown before I get
OSError: [WinError 126] No se puede encontrar el módulo especificado. Error loading "C:\Users\zer0a\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\lib\shm.dll" or one of its dependencies.

@bw4sz
Copy link
Collaborator

bw4sz commented Jun 27, 2024

please run and paste entire output.

conda create python=3.10 --name DeepForest_env
conda activate DeepForest_env
pip install deepforest

@Diego-asutralgis
Copy link
Author

Here it is!:
PS C:\Users\zer0a> conda create python=3.10 --name DeepForest_env
Retrieving notices: ...working... done
Channels:

  • soumith
  • conda-forge
  • defaults
    Platform: win-64
    Collecting package metadata (repodata.json): done
    Solving environment: done

Package Plan

environment location: A:\Anaconda\envs\DeepForest_env

added / updated specs:
- python=3.10

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
openssl-3.3.1              |       h2466b09_1         8.0 MB  conda-forge
python-3.10.14             |h4de0772_0_cpython        15.1 MB  conda-forge
------------------------------------------------------------
                                       Total:        23.1 MB

The following NEW packages will be INSTALLED:

bzip2 conda-forge/win-64::bzip2-1.0.8-hcfcfb64_5
ca-certificates conda-forge/win-64::ca-certificates-2024.6.2-h56e8100_0
libffi conda-forge/win-64::libffi-3.4.2-h8ffe710_5
libsqlite conda-forge/win-64::libsqlite-3.46.0-h2466b09_0
libzlib conda-forge/win-64::libzlib-1.3.1-h2466b09_1
openssl conda-forge/win-64::openssl-3.3.1-h2466b09_1
pip conda-forge/noarch::pip-24.0-pyhd8ed1ab_0
python conda-forge/win-64::python-3.10.14-h4de0772_0_cpython
setuptools conda-forge/noarch::setuptools-70.1.1-pyhd8ed1ab_0
tk conda-forge/win-64::tk-8.6.13-h5226925_1
tzdata conda-forge/noarch::tzdata-2024a-h0c530f3_0
ucrt conda-forge/win-64::ucrt-10.0.22621.0-h57928b3_0
vc conda-forge/win-64::vc-14.3-h8a93ad2_20
vc14_runtime conda-forge/win-64::vc14_runtime-14.40.33810-ha82c5b3_20
vs2015_runtime conda-forge/win-64::vs2015_runtime-14.40.33810-h3bf8584_20
wheel conda-forge/noarch::wheel-0.43.0-pyhd8ed1ab_1
xz conda-forge/win-64::xz-5.2.6-h8d14728_0

Proceed ([y]/n)? y

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

To activate this environment, use

To deactivate an active environment, use

$ conda deactivate

PS C:\Users\zer0a> conda activate DeepForest_env
PS C:\Users\zer0a> pip install deepforest
Collecting deepforest
Downloading deepforest-1.3.3-py3-none-any.whl.metadata (1.9 kB)
Collecting albumentations>=1.0.0 (from deepforest)
Downloading albumentations-1.4.10-py3-none-any.whl.metadata (38 kB)
Collecting geopandas (from deepforest)
Downloading geopandas-1.0.0-py3-none-any.whl.metadata (2.2 kB)
Requirement already satisfied: imagecodecs in a:\anaconda\lib\site-packages (from deepforest) (2023.1.23)
Requirement already satisfied: matplotlib in a:\anaconda\lib\site-packages (from deepforest) (3.8.0)
Requirement already satisfied: numpy in a:\anaconda\lib\site-packages (from deepforest) (1.26.4)
Collecting opencv-python>=4.5.4 (from deepforest)
Downloading opencv_python-4.10.0.84-cp37-abi3-win_amd64.whl.metadata (20 kB)
Requirement already satisfied: pandas in a:\anaconda\lib\site-packages (from deepforest) (2.1.4)
Requirement already satisfied: Pillow>6.2.0 in a:\anaconda\lib\site-packages (from deepforest) (10.2.0)
Collecting progressbar2 (from deepforest)
Downloading progressbar2-4.4.2-py3-none-any.whl.metadata (17 kB)
Collecting pycocotools (from deepforest)
Downloading pycocotools-2.0.8-cp311-cp311-win_amd64.whl.metadata (1.1 kB)
Collecting pytorch-lightning>=1.5.8 (from deepforest)
Downloading pytorch_lightning-2.3.1-py3-none-any.whl.metadata (21 kB)
Collecting rasterio (from deepforest)
Downloading rasterio-1.3.10-cp311-cp311-win_amd64.whl.metadata (15 kB)
Collecting recommonmark (from deepforest)
Downloading recommonmark-0.7.1-py2.py3-none-any.whl.metadata (463 bytes)
Requirement already satisfied: rtree in a:\anaconda\lib\site-packages (from deepforest) (1.0.1)
Requirement already satisfied: scipy>1.5 in a:\anaconda\lib\site-packages (from deepforest) (1.11.4)
Requirement already satisfied: six in a:\anaconda\lib\site-packages (from deepforest) (1.16.0)
Collecting slidingwindow (from deepforest)
Downloading slidingwindow-0.0.14-py3-none-any.whl.metadata (309 bytes)
Requirement already satisfied: sphinx in a:\anaconda\lib\site-packages (from deepforest) (5.0.2)
Collecting torch (from deepforest)
Downloading torch-2.3.1-cp311-cp311-win_amd64.whl.metadata (26 kB)
Collecting torchvision>=0.13 (from deepforest)
Downloading torchvision-0.18.1-cp311-cp311-win_amd64.whl.metadata (6.6 kB)
Requirement already satisfied: tqdm in a:\anaconda\lib\site-packages (from deepforest) (4.65.0)
Collecting xmltodict (from deepforest)
Downloading xmltodict-0.13.0-py2.py3-none-any.whl.metadata (7.7 kB)
Requirement already satisfied: scikit-image>=0.21.0 in a:\anaconda\lib\site-packages (from albumentations>=1.0.0->deepforest) (0.22.0)
Requirement already satisfied: PyYAML in a:\anaconda\lib\site-packages (from albumentations>=1.0.0->deepforest) (6.0.1)
Requirement already satisfied: typing-extensions>=4.9.0 in a:\anaconda\lib\site-packages (from albumentations>=1.0.0->deepforest) (4.9.0)
Collecting scikit-learn>=1.3.2 (from albumentations>=1.0.0->deepforest)
Downloading scikit_learn-1.5.0-cp311-cp311-win_amd64.whl.metadata (11 kB)
Collecting pydantic>=2.7.0 (from albumentations>=1.0.0->deepforest)
Using cached pydantic-2.7.4-py3-none-any.whl.metadata (109 kB)
Collecting albucore>=0.0.11 (from albumentations>=1.0.0->deepforest)
Downloading albucore-0.0.12-py3-none-any.whl.metadata (3.1 kB)
Collecting opencv-python-headless>=4.9.0.80 (from albumentations>=1.0.0->deepforest)
Downloading opencv_python_headless-4.10.0.84-cp37-abi3-win_amd64.whl.metadata (20 kB)
Requirement already satisfied: fsspec>=2022.5.0 in a:\anaconda\lib\site-packages (from fsspec[http]>=2022.5.0->pytorch-lightning>=1.5.8->deepforest) (2023.10.0)
Collecting torchmetrics>=0.7.0 (from pytorch-lightning>=1.5.8->deepforest)
Using cached torchmetrics-1.4.0.post0-py3-none-any.whl.metadata (19 kB)
Requirement already satisfied: packaging>=20.0 in a:\anaconda\lib\site-packages (from pytorch-lightning>=1.5.8->deepforest) (23.1)
Collecting lightning-utilities>=0.10.0 (from pytorch-lightning>=1.5.8->deepforest)
Downloading lightning_utilities-0.11.3.post0-py3-none-any.whl.metadata (4.7 kB)
Requirement already satisfied: filelock in a:\anaconda\lib\site-packages (from torch->deepforest) (3.13.1)
Requirement already satisfied: sympy in a:\anaconda\lib\site-packages (from torch->deepforest) (1.12)
Requirement already satisfied: networkx in a:\anaconda\lib\site-packages (from torch->deepforest) (3.1)
Requirement already satisfied: jinja2 in a:\anaconda\lib\site-packages (from torch->deepforest) (3.1.3)
Collecting mkl<=2021.4.0,>=2021.1.1 (from torch->deepforest)
Using cached mkl-2021.4.0-py2.py3-none-win_amd64.whl.metadata (1.4 kB)
Requirement already satisfied: colorama in a:\anaconda\lib\site-packages (from tqdm->deepforest) (0.4.6)
Collecting pyogrio>=0.7.2 (from geopandas->deepforest)
Downloading pyogrio-0.9.0-cp311-cp311-win_amd64.whl.metadata (3.9 kB)
Collecting pyproj>=3.3.0 (from geopandas->deepforest)
Downloading pyproj-3.6.1-cp311-cp311-win_amd64.whl.metadata (31 kB)
Collecting shapely>=2.0.0 (from geopandas->deepforest)
Downloading shapely-2.0.4-cp311-cp311-win_amd64.whl.metadata (7.2 kB)
Requirement already satisfied: python-dateutil>=2.8.2 in a:\anaconda\lib\site-packages (from pandas->deepforest) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in a:\anaconda\lib\site-packages (from pandas->deepforest) (2023.3.post1)
Requirement already satisfied: tzdata>=2022.1 in a:\anaconda\lib\site-packages (from pandas->deepforest) (2023.3)
Requirement already satisfied: contourpy>=1.0.1 in a:\anaconda\lib\site-packages (from matplotlib->deepforest) (1.2.0)
Requirement already satisfied: cycler>=0.10 in a:\anaconda\lib\site-packages (from matplotlib->deepforest) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in a:\anaconda\lib\site-packages (from matplotlib->deepforest) (4.25.0)
Requirement already satisfied: kiwisolver>=1.0.1 in a:\anaconda\lib\site-packages (from matplotlib->deepforest) (1.4.4)
Requirement already satisfied: pyparsing>=2.3.1 in a:\anaconda\lib\site-packages (from matplotlib->deepforest) (3.0.9)
Collecting python-utils>=3.8.1 (from progressbar2->deepforest)
Downloading python_utils-3.8.2-py2.py3-none-any.whl.metadata (9.7 kB)
Collecting affine (from rasterio->deepforest)
Downloading affine-2.4.0-py3-none-any.whl.metadata (4.0 kB)
Requirement already satisfied: attrs in a:\anaconda\lib\site-packages (from rasterio->deepforest) (23.1.0)
Requirement already satisfied: certifi in a:\anaconda\lib\site-packages (from rasterio->deepforest) (2024.6.2)
Requirement already satisfied: click>=4.0 in a:\anaconda\lib\site-packages (from rasterio->deepforest) (8.1.7)
Collecting cligj>=0.5 (from rasterio->deepforest)
Downloading cligj-0.7.2-py3-none-any.whl.metadata (5.0 kB)
Collecting snuggs>=1.4.1 (from rasterio->deepforest)
Downloading snuggs-1.4.7-py3-none-any.whl.metadata (3.4 kB)
Collecting click-plugins (from rasterio->deepforest)
Downloading click_plugins-1.1.1-py2.py3-none-any.whl.metadata (6.4 kB)
Requirement already satisfied: setuptools in a:\anaconda\lib\site-packages (from rasterio->deepforest) (68.2.2)
Collecting commonmark>=0.8.1 (from recommonmark->deepforest)
Downloading commonmark-0.9.1-py2.py3-none-any.whl.metadata (5.7 kB)
Requirement already satisfied: docutils>=0.11 in a:\anaconda\lib\site-packages (from recommonmark->deepforest) (0.18.1)
Requirement already satisfied: sphinxcontrib-applehelp in a:\anaconda\lib\site-packages (from sphinx->deepforest) (1.0.2)
Requirement already satisfied: sphinxcontrib-devhelp in a:\anaconda\lib\site-packages (from sphinx->deepforest) (1.0.2)
Requirement already satisfied: sphinxcontrib-jsmath in a:\anaconda\lib\site-packages (from sphinx->deepforest) (1.0.1)
Requirement already satisfied: sphinxcontrib-htmlhelp>=2.0.0 in a:\anaconda\lib\site-packages (from sphinx->deepforest) (2.0.0)
Requirement already satisfied: sphinxcontrib-serializinghtml>=1.1.5 in a:\anaconda\lib\site-packages (from sphinx->deepforest) (1.1.5)
Requirement already satisfied: sphinxcontrib-qthelp in a:\anaconda\lib\site-packages (from sphinx->deepforest) (1.0.3)
Requirement already satisfied: Pygments>=2.0 in a:\anaconda\lib\site-packages (from sphinx->deepforest) (2.15.1)
Requirement already satisfied: snowballstemmer>=1.1 in a:\anaconda\lib\site-packages (from sphinx->deepforest) (2.2.0)
Requirement already satisfied: babel>=1.3 in a:\anaconda\lib\site-packages (from sphinx->deepforest) (2.11.0)
Requirement already satisfied: alabaster<0.8,>=0.7 in a:\anaconda\lib\site-packages (from sphinx->deepforest) (0.7.12)
Requirement already satisfied: imagesize in a:\anaconda\lib\site-packages (from sphinx->deepforest) (1.4.1)
Requirement already satisfied: requests>=2.5.0 in a:\anaconda\lib\site-packages (from sphinx->deepforest) (2.31.0)
Requirement already satisfied: psutil in a:\anaconda\lib\site-packages (from slidingwindow->deepforest) (5.9.0)
Collecting tomli>=2.0.1 (from albucore>=0.0.11->albumentations>=1.0.0->deepforest)
Downloading tomli-2.0.1-py3-none-any.whl.metadata (8.9 kB)
Requirement already satisfied: aiohttp!=4.0.0a0,!=4.0.0a1 in a:\anaconda\lib\site-packages (from fsspec[http]>=2022.5.0->pytorch-lightning>=1.5.8->deepforest) (3.9.3)
Requirement already satisfied: MarkupSafe>=2.0 in a:\anaconda\lib\site-packages (from jinja2->torch->deepforest) (2.1.3)
Collecting intel-openmp==2021.* (from mkl<=2021.4.0,>=2021.1.1->torch->deepforest)
Using cached intel_openmp-2021.4.0-py2.py3-none-win_amd64.whl.metadata (1.2 kB)
Collecting tbb==2021.* (from mkl<=2021.4.0,>=2021.1.1->torch->deepforest)
Downloading tbb-2021.13.0-py3-none-win_amd64.whl.metadata (1.1 kB)
Collecting annotated-types>=0.4.0 (from pydantic>=2.7.0->albumentations>=1.0.0->deepforest)
Using cached annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)
Collecting pydantic-core==2.18.4 (from pydantic>=2.7.0->albumentations>=1.0.0->deepforest)
Downloading pydantic_core-2.18.4-cp311-none-win_amd64.whl.metadata (6.7 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in a:\anaconda\lib\site-packages (from requests>=2.5.0->sphinx->deepforest) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in a:\anaconda\lib\site-packages (from requests>=2.5.0->sphinx->deepforest) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in a:\anaconda\lib\site-packages (from requests>=2.5.0->sphinx->deepforest) (2.0.7)
Requirement already satisfied: imageio>=2.27 in a:\anaconda\lib\site-packages (from scikit-image>=0.21.0->albumentations>=1.0.0->deepforest) (2.33.1)
Requirement already satisfied: tifffile>=2022.8.12 in a:\anaconda\lib\site-packages (from scikit-image>=0.21.0->albumentations>=1.0.0->deepforest) (2023.4.12)
Requirement already satisfied: lazy_loader>=0.3 in a:\anaconda\lib\site-packages (from scikit-image>=0.21.0->albumentations>=1.0.0->deepforest) (0.3)
Requirement already satisfied: joblib>=1.2.0 in a:\anaconda\lib\site-packages (from scikit-learn>=1.3.2->albumentations>=1.0.0->deepforest) (1.2.0)
Collecting threadpoolctl>=3.1.0 (from scikit-learn>=1.3.2->albumentations>=1.0.0->deepforest)
Downloading threadpoolctl-3.5.0-py3-none-any.whl.metadata (13 kB)
Requirement already satisfied: mpmath>=0.19 in a:\anaconda\lib\site-packages (from sympy->torch->deepforest) (1.3.0)
Requirement already satisfied: aiosignal>=1.1.2 in a:\anaconda\lib\site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>=2022.5.0->pytorch-lightning>=1.5.8->deepforest) (1.2.0)
Requirement already satisfied: frozenlist>=1.1.1 in a:\anaconda\lib\site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>=2022.5.0->pytorch-lightning>=1.5.8->deepforest) (1.4.0)
Requirement already satisfied: multidict<7.0,>=4.5 in a:\anaconda\lib\site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>=2022.5.0->pytorch-lightning>=1.5.8->deepforest) (6.0.4)
Requirement already satisfied: yarl<2.0,>=1.0 in a:\anaconda\lib\site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>=2022.5.0->pytorch-lightning>=1.5.8->deepforest) (1.9.3)
Downloading deepforest-1.3.3-py3-none-any.whl (20.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.0/20.0 MB 3.3 MB/s eta 0:00:00
Downloading albumentations-1.4.10-py3-none-any.whl (161 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 161.9/161.9 kB 4.7 MB/s eta 0:00:00
Downloading opencv_python-4.10.0.84-cp37-abi3-win_amd64.whl (38.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.8/38.8 MB 4.4 MB/s eta 0:00:00
Downloading pytorch_lightning-2.3.1-py3-none-any.whl (812 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 812.3/812.3 kB 4.7 MB/s eta 0:00:00
Downloading torch-2.3.1-cp311-cp311-win_amd64.whl (159.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 159.8/159.8 MB 4.2 MB/s eta 0:00:00
Downloading torchvision-0.18.1-cp311-cp311-win_amd64.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 4.7 MB/s eta 0:00:00
Downloading geopandas-1.0.0-py3-none-any.whl (323 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 323.4/323.4 kB 5.1 MB/s eta 0:00:00
Downloading progressbar2-4.4.2-py3-none-any.whl (56 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.8/56.8 kB ? eta 0:00:00
Downloading pycocotools-2.0.8-cp311-cp311-win_amd64.whl (85 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.3/85.3 kB 2.4 MB/s eta 0:00:00
Downloading rasterio-1.3.10-cp311-cp311-win_amd64.whl (24.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 24.3/24.3 MB 4.5 MB/s eta 0:00:00
Downloading recommonmark-0.7.1-py2.py3-none-any.whl (10 kB)
Downloading slidingwindow-0.0.14-py3-none-any.whl (9.0 kB)
Downloading xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
Downloading albucore-0.0.12-py3-none-any.whl (8.4 kB)
Downloading cligj-0.7.2-py3-none-any.whl (7.1 kB)
Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.1/51.1 kB 2.6 MB/s eta 0:00:00
Downloading lightning_utilities-0.11.3.post0-py3-none-any.whl (26 kB)
Using cached mkl-2021.4.0-py2.py3-none-win_amd64.whl (228.5 MB)
Using cached intel_openmp-2021.4.0-py2.py3-none-win_amd64.whl (3.5 MB)
Downloading tbb-2021.13.0-py3-none-win_amd64.whl (286 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 286.9/286.9 kB 3.5 MB/s eta 0:00:00
Downloading opencv_python_headless-4.10.0.84-cp37-abi3-win_amd64.whl (38.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.8/38.8 MB 4.6 MB/s eta 0:00:00
Using cached pydantic-2.7.4-py3-none-any.whl (409 kB)
Downloading pydantic_core-2.18.4-cp311-none-win_amd64.whl (1.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 5.3 MB/s eta 0:00:00
Downloading pyogrio-0.9.0-cp311-cp311-win_amd64.whl (15.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.9/15.9 MB 4.5 MB/s eta 0:00:00
Downloading pyproj-3.6.1-cp311-cp311-win_amd64.whl (6.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 4.5 MB/s eta 0:00:00
Downloading python_utils-3.8.2-py2.py3-none-any.whl (27 kB)
Downloading scikit_learn-1.5.0-cp311-cp311-win_amd64.whl (11.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.0/11.0 MB 4.6 MB/s eta 0:00:00
Downloading shapely-2.0.4-cp311-cp311-win_amd64.whl (1.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 4.6 MB/s eta 0:00:00
Downloading snuggs-1.4.7-py3-none-any.whl (5.4 kB)
Using cached torchmetrics-1.4.0.post0-py3-none-any.whl (868 kB)
Downloading affine-2.4.0-py3-none-any.whl (15 kB)
Downloading click_plugins-1.1.1-py2.py3-none-any.whl (7.5 kB)
Using cached annotated_types-0.7.0-py3-none-any.whl (13 kB)
Downloading threadpoolctl-3.5.0-py3-none-any.whl (18 kB)
Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Installing collected packages: tbb, intel-openmp, commonmark, xmltodict, tomli, threadpoolctl, snuggs, slidingwindow, shapely, python-utils, pyproj, pyogrio, pydantic-core, opencv-python-headless, opencv-python, mkl, lightning-utilities, annotated-types, affine, torch, scikit-learn, pydantic, progressbar2, cligj, click-plugins, albucore, torchvision, torchmetrics, recommonmark, rasterio, pycocotools, geopandas, albumentations, pytorch-lightning, deepforest
Attempting uninstall: threadpoolctl
Found existing installation: threadpoolctl 2.2.0
Uninstalling threadpoolctl-2.2.0:
Successfully uninstalled threadpoolctl-2.2.0

after running that installation and then running the test code on the VE it can`t recognize any of the libraries that where installed by deepforest installation.

ModuleNotFoundError Traceback (most recent call last)
Cell In[5], line 1
----> 1 import matplotlib.pyplot as plt
2 import pandas as pd
3 import numpy as np

ModuleNotFoundError: No module named 'matplotlib'

@bw4sz
Copy link
Collaborator

bw4sz commented Jun 28, 2024

Thanks, but don't skip steps, its going to be something really subtle, so you need to show everything. Show me

which python

and the terminal state right before you invoke python. I am guessing its looking at a python version that supercedes what you just installed. The module traceback should also give you a path, which i'm guess is not in the DeepForest_env conda directory. The fact that you are getting 'no module named matplotlib' is good news is the sense that unless all of python ecosystem has suddenly crashed (-> world ending) this is very unlikely to be a bug and much more something specific to your system setup.

@henrykironde
Copy link
Contributor

henrykironde commented Jun 28, 2024

There is something wrong with your setup. Please revisit how to manage / setup conda or python environments.

The environment location use is: A:\Anaconda\envs\DeepForest_env
however you are installing the packages outside the environment to the base environment

Requirement already satisfied: sphinxcontrib-qthelp in a:\anaconda\lib\site-packages (from sphinx->deepforest) (1.0.3)
Requirement already satisfied: Pygments>=2.0 in a:\anaconda\lib\site-packages (from sphinx->deepforest) (2.15.1)

@bw4sz bw4sz added the Awaiting author contribution Waiting on the issue author to do something before proceeding label Jul 1, 2024
@ethanwhite
Copy link
Member

Closing this due to lack of response. @Diego-asutralgis - feel free to open a new discussion if you are still having issues with your conda install and hopefully someone will have time to help.

@github-actions github-actions bot removed the Awaiting author contribution Waiting on the issue author to do something before proceeding label Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants