opengeos / segment-geospatial

A Python package for segmenting geospatial data with the Segment Anything Model (SAM)
https://samgeo.gishub.org
MIT License
3.06k stars 313 forks source link

install groundingdino-py error #144

Closed lina926 closed 1 year ago

lina926 commented 1 year ago

Environment Information

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

What I Did

pip install segment-geospatial groundingdino-py leafmap localtileserver

Requirement already satisfied: segment-geospatial in c:\anaconda3\envs\sam\lib\site-packages (0.8.4) Collecting groundingdino-py Using cached groundingdino-py-0.4.0.tar.gz (82 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'error' Note: you may need to restart the kernel to use updated packages. error: subprocess-exited-with-error

python setup.py egg_info did not run successfully. exit code: 1

[6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\Administrator\AppData\Local\Temp\pip-install-tnqtijfw\groundingdino-py_7e3e05927c1545e08c61fded3d5bed84\setup.py", line 41, in readme = readme_file.read() UnicodeDecodeError: 'gbk' codec can't decode byte 0xa4 in position 2878: illegal multibyte sequence [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

giswqs commented 1 year ago

I am waiting for groundingdino to appear on conda-forge. https://github.com/conda-forge/staged-recipes/pull/22907

For now, you can install it with the following commands. It works smoothly on Windows 11.

conda create -n geo python=3.10
conda activate geo
conda install -c conda-forge mamba
mamba install -c conda-forge segment-geospatial
pip install groundingdino-py

image

giswqs commented 1 year ago

Groundingdino is available on conda-forge now.

mamba install -c conda-forge groundingdino-py

https://anaconda.org/conda-forge/groundingdino-py