OpenWaterAnalytics / epanet-python

python wrapper for epanet library
76 stars 40 forks source link

Problem Building on WSL - Ubuntu 18.04 #60

Closed mxfeinberg closed 4 years ago

mxfeinberg commented 4 years ago

After following the instructions for building, I get the following error when I try to test my build.

ImportError while importing test module '/mnt/c/Users/maxwe/OneDrive/Documents/UpWork/Water/epanet-python/owa-epanet/test/test_owa_epanet.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /home/max/.local/share/virtualenvs/test-CAxsfYHR/lib/python3.7/site-packages/epanet/toolkit.py:14: in swig_import_helper return importlib.import_module(mname) /home/max/miniconda3/lib/python3.7/importlib/init.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level)

:1006: in _gcd_import ??? :983: in _find_and_load ??? :967: in _find_and_load_unlocked ??? :670: in _load_unlocked ??? :583: in module_from_spec ??? :1043: in create_module ??? :219: in _call_with_frames_removed ??? E ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: test_owa_epanet.py:5: in import epanet.toolkit as en /home/max/.local/share/virtualenvs/test-CAxsfYHR/lib/python3.7/site-packages/epanet/toolkit.py:17: in _toolkit = swig_import_helper() /home/max/.local/share/virtualenvs/test-CAxsfYHR/lib/python3.7/site-packages/epanet/toolkit.py:16: in swig_import_helper return importlib.import_module('_toolkit') /home/max/miniconda3/lib/python3.7/importlib/__init__.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) E ModuleNotFoundError: No module named '_toolkit' Do you have any guidance or troubleshooting tips? Please let me know if there's any more information that I can provide that might be helpful.
mxfeinberg commented 4 years ago

I solved the issue by running sudo apt-get install libpython3.7 per here

samhatchett commented 4 years ago

that's great you got it working. I was just logging in to see if I could replicate. Let us know how things go!

mxfeinberg commented 4 years ago

Will do! I appreciate the quick response and I'm excited to dive-in.