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

Error while using pynhd. #57

Closed
rezaulwre opened this issue May 23, 2022 · 4 comments
Closed

Error while using pynhd. #57

rezaulwre opened this issue May 23, 2022 · 4 comments

Comments

@rezaulwre
Copy link

What happened: I am trying to use pynhd but it gives the error: "ImportError: DLL load failed while importing lib: The specified module could not be found." How to solve this?

pynhd.show_versions()

ImportError Traceback (most recent call last)
in
----> 1 pynhd.show_versions()

~\anaconda3\lib\site-packages\pynhd\print_versions.py in show_versions(file)
168 for (modname, ver_f) in deps:
169 try:
--> 170 mod = _get_mod(modname)
171 except ModuleNotFoundError:
172 deps_blob.append((modname, None))

~\anaconda3\lib\site-packages\pynhd\print_versions.py in get_mod(modname)
94 return sys.modules[modname]
95 try:
---> 96 return importlib.import_module(modname)
97 except ModuleNotFoundError:
98 return importlib.import_module(modname.replace("-", "
"))

~\anaconda3\lib\importlib_init_.py in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129

~\anaconda3\lib\importlib_bootstrap.py in _gcd_import(name, package, level)

~\anaconda3\lib\importlib_bootstrap.py in find_and_load(name, import)

~\anaconda3\lib\importlib_bootstrap.py in find_and_load_unlocked(name, import)

~\anaconda3\lib\importlib_bootstrap.py in _load_unlocked(spec)

~\anaconda3\lib\importlib_bootstrap_external.py in exec_module(self, module)

~\anaconda3\lib\importlib_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)

~\anaconda3\lib\site-packages\pygeos_init_.py in
32 # end delvewheel patch
33
---> 34 from .lib import GEOSException # NOQA
35 from .lib import Geometry # NOQA
36 from .lib import geos_version, geos_version_string # NOQA

ImportError: DLL load failed while importing lib: The specified module could not be found.

=========================
What you expected to happen:

Minimal Complete Verifiable Example:

# Put your MCVE code here

Anything else we need to know?:

Environment: I am using Python 3.7.12 with anaconda.

Output of pynhd.show_versions()

@cheginit
Copy link
Collaborator

It seems that there's some issue with GDAL installation. How did you install pynhd? Did you install it in an existing conda environment or did you create a new environment?

@rezaulwre
Copy link
Author

I created a new conda environment with Python 3.7.12. My base environment comes with Python 3.8 version. I installed pynhd using conda command in the new environment.

@cheginit
Copy link
Collaborator

Can you create a new environment like this and report back?

conda create -n hr -c conda-forge pynhd py3dep
conda activate hr
python -c "import pynhd;pynhd.show_versions()"

As an aside, I'd highly recommend using mambaforge as a drop-in replacement for conda.

@cheginit
Copy link
Collaborator

cheginit commented Aug 1, 2022

Please feel free to open this issue you still have problem with this.

@cheginit cheginit closed this as completed Aug 1, 2022
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