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

Local wheel built on Linux exhibits multiple library import errors when loading wrapper library #80

Closed
michaeltryby opened this issue Jul 6, 2021 · 1 comment

Comments

@michaeltryby
Copy link
Contributor

Building owa-epanet wheel locally on Ubuntu 18 (WSL) with Python 3.7 in a Conda env.

The build and install proceed as normal. I get the following error when running pytest

(base) mtryby@DESKTOP-NLLFR13:~/OWA/epanet-python/owa-epanet$ python -m pytest
================================================= test session starts ==================================================
platform linux -- Python 3.7.6, pytest-6.0.2, py-1.9.0, pluggy-0.13.1
rootdir: /home/mtryby/OWA/epanet-python/owa-epanet
collected 0 items / 1 error

======================================================== ERRORS ========================================================
_______________________________________ ERROR collecting test/test_owa_epanet.py _______________________________________
ImportError while importing test module '/home/mtryby/OWA/epanet-python/owa-epanet/test/test_owa_epanet.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniconda3/lib/python3.7/site-packages/epanet/toolkit.py:14: in swig_import_helper
    return importlib.import_module(mname)
../../../miniconda3/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1006: in _gcd_import
    ???
<frozen importlib._bootstrap>:983: in _find_and_load
    ???
<frozen importlib._bootstrap>:967: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:670: in _load_unlocked
    ???
<frozen importlib._bootstrap>:583: in module_from_spec
    ???
<frozen importlib._bootstrap_external>:1043: in create_module
    ???
<frozen importlib._bootstrap>: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:
../../../miniconda3/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
test/test_owa_epanet.py:5: in <module>
    import epanet.toolkit as en
../../../miniconda3/lib/python3.7/site-packages/epanet/toolkit.py:17: in <module>
    _toolkit = swig_import_helper()
../../../miniconda3/lib/python3.7/site-packages/epanet/toolkit.py:16: in swig_import_helper
    return importlib.import_module('_toolkit')
../../../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'
=============================================== short test summary info ================================================
ERROR test/test_owa_epanet.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================== 1 error in 0.41s ===================================================
@samhatchett
Copy link
Member

dupe of #82

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