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

GRID does not run #11

Closed
volpatoo opened this issue Jun 18, 2022 · 3 comments
Closed

GRID does not run #11

volpatoo opened this issue Jun 18, 2022 · 3 comments

Comments

@volpatoo
Copy link

Hi,

Thanks for sharing this amazing python library. I am having some trouble loading the app.
I tried many different python versions, rasterio, gdal, etc. But any of these worked.

I would like to know if you have any recommendations to run this app on the Windows system like the python version, rasterio, etc.

Please let me know if this info is enough to help me with this bug.

Many thanks.

(GRID) C:\Users\leoag>python -m grid

                 Welcome to GRID Ver.1.2.18
~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~
Author      : James Chen <chun-peng.chen@wsu.edu>
Last update : Aug 31, 2021
User manual : https://poissonfish.github.io/GRID/
~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~
Recent update
    - Support images with huge dimensions (> 32767)
    - Add CRS to shapefiles (.prj)
    - Support ESRI shapefile compatible in QGIS
~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~
Traceback (most recent call last):
  File "C:\Users\leoag\anaconda3\envs\GRID\lib\runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\Users\leoag\anaconda3\envs\GRID\lib\runpy.py", line 147, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "C:\Users\leoag\anaconda3\envs\GRID\lib\runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "C:\Users\leoag\anaconda3\envs\GRID\lib\site-packages\grid\__init__.py", line 72, in <module>
    from .grid import *
  File "C:\Users\leoag\anaconda3\envs\GRID\lib\site-packages\grid\grid.py", line 4, in <module>
    from .gmap import *
  File "C:\Users\leoag\anaconda3\envs\GRID\lib\site-packages\grid\gmap.py", line 7, in <module>
    from .io import *
  File "C:\Users\leoag\anaconda3\envs\GRID\lib\site-packages\grid\io.py", line 12, in <module>
    import rasterio
  File "C:\Users\leoag\anaconda3\envs\GRID\lib\site-packages\rasterio\__init__.py", line 9, in <module>
    from rasterio._base import gdal_version
ImportError: DLL load failed while importing _base: The specified procedure could not be found.

(GRID) C:\Users\leoag>`

(GRID) C:\Users\leoag>pip show rasterio
Name: rasterio
Version: 1.2.10
Summary: Fast and direct raster I/O for use with Numpy and SciPy
Home-page: https://github.com/mapbox/rasterio
Author: Sean Gillies
Author-email: sean@mapbox.com
License: BSD
Location: c:\users\leoag\anaconda3\envs\grid\lib\site-packages
Requires: affine, attrs, certifi, click, click-plugins, cligj, numpy, setuptools, snuggs
Required-by: photo-grid`

(GRID) C:\Users\leoag>pip show photo_grid
Name: photo-grid
Version: 1.2.18
Summary: A GUI for field segmentation
Home-page: https://github.com/Poissonfish/GRID
Author: James Chen
Author-email: chun-peng.chen@wsu.edu
License: GPLv3
Location: c:\users\leoag\anaconda3\envs\grid\lib\site-packages
Requires: h5py, image, matplotlib, numpy, opencv-python, pandas, PyQt5, pyshp, qdarkstyle, rasterio, scipy, sklearn, tqdm
Required-by:`


@Poissonfish
Copy link
Owner

Hi,

Thanks for reporting the issue. Would you try the following steps:

# create a new environment
conda create --name grid
conda activate grid
# install rasterio through conda
conda install rasterio
# install GRID through pip
python -m pip install photo_grid

And let me know what error messages you got? Thanks.

@volpatoo
Copy link
Author

Thanks for helping me out.
Yes, I tried that method as well, but it did not work. I got the same issue. In the end, I was able to figure it out when I saved the GDAL path only to my windows environment and install the whl directly from the cmd.

@Poissonfish
Copy link
Owner

Thanks for the update. Sorry I was not able to replicate the error on my Mac/Linux computers. Your solution is very valuable to other Windows users!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants