openwateranalytics / epanet-python Goto Github PK
View Code? Open in Web Editor NEWpython wrapper for epanet library
python wrapper for epanet library
When running a sdist or bdist build at the namespace level, invalid microlibrary packages are produced.
Negative pressures are a good indicator for detecting unsatisfying demands. I can only get negative pressures if I comment out this line.
https://github.com/OpenWaterAnalytics/epanet-python/blob/dev/epanet-module/epamodule.py#L596
The code causing the error.
pressure = em.ENgetnodevalue(nodeindex, em.EN_PRESSURE)
Hi,
When calling quality analysis functions such as EN.initQ() or EN.runQ() I get the following error:
File "path_to_epamodule.py/epamodule.py", line 624, in ENinitQ
if ierr !=0: raise ENtoolkitError(ierr)
epamodule.ENtoolkitError: Error 105: water quality solver not opened
I'm using Python 3.7 on windows 64 bit
I need an administrator to turn on Appveyor for this repo. Thanks!
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.
Building owa-epanet wheel locally on Windows 10 with Python 3.7 running in Conda env.
The build and install proceed as normal. 21 of 24 unit tests fail when running pytest. Typical error follows
FAILED test/test_owa_epanet.py::test_open - PermissionError: [WinError 32] The process cannot access the file because...
When I use the latest version of owa-epanet to run the hydraulic analysis in the mode of PDA, I encountered a fatal error about pump simulation.
The network contains many leak nodes, which are modelled by emitters. Pumps are used to lift the water in the upstream tank to the downside. The initial status of pumps is OPEN. There are no any control rules for them. During the EPS, the upstream tank is empty, whereas the value of the flow for pumps are positive.
When I use the EPANET 2.2 GUI to run the same network, there are no errors. That is, the flowrate of pump is zero. They are switched closed.
I do not know how to set parameters for this error.
I am trying to build epanet-python package on my computer.
After running the code: python3 setup.py sdist bdist_wheel
, it returned the cmake error at CMakeLists.txt.
The cmake error I encoutered is specified below:
CMake Error at CMakeLists.txt:38 (ADD_SUBDIRECTORY):
The source directory
C:/Users/Ziyuan/AppData/Local/Programs/Python/Python37/Lib/site-packages/owa-epanet/EPANET
does not contain a CMakeLists.txt file.
Appreicate a lot if any advices!
I am getting the Exception: WARNING: System has negative pressures. while running
`from epanet.toolkit import toolkit as EN
inpfile = 'Networks/Net6.inp'
rptfile = 'temp.rpt'
binfile = 'temp.bin'
errors = []
ph = EN.proj_create()
errors.append(EN.proj_open(ph, inpfile, rptfile, binfile))
errors.append(EN.hydr_solve(ph))`
This inconsistent with EPANET2 behavior with the same .inp file
Python Windows Platform Compilers:
Python 2.7 - Visual Studio 9 2008
Python 3.3, 3.4 - Visual Studio 10 2010
Python 3.5, 3.6, 3.7 - Visual Studio 14 2015
Current EPANET benchmark builds on Visual Studio 15 2017
PyQGIS targets Python 3.6
Should we support Python 2.7, 3.3, 3.4?
dmnd_setmodel(ph: 'Handle', type: 'int', pmin: 'double', preq: 'double', pexp: 'double') -> "int":
To match the rest of the toolkit wrapper, shouldn't the type of type
be EN.DemandModel enum?
Calling EN.dmnd_setmodel(ph, EN.DemandModel.PDA, pmin, preq, pexp)
raises
'TypeError: in method 'dmnd_setmodel', argument 2 of type 'int'' in spyder.
Not sure what all this entails.
I've tried doing this
$ python -m pip install owa-epanet --user
and returned this error:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-od5rmipk/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pdma2s/.local/include/python3.8/owa-epanet
cwd: /tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/
Complete output (90 lines):
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 10.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/_cmake_test_compile/build
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - success
--------------------------------------------------------------------------------
Configuring Project
Working directory:
/tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/_skbuild/linux-x86_64-3.8/cmake-build
Command:
cmake /tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python -DPYTHON_VERSION_STRING:STRING=3.8.6 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPYTHON_LIBRARY:FILEPATH=/usr/lib/libpython3.8.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/pdma2s/.local/lib/python3.8/site-packages/skbuild/resources/cmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_BUILD_TYPE:STRING=Release
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The project is built using scikit-build
-- Found PythonLibs: /usr/lib/libpython3.8.so (found suitable version "3.8.6", minimum required is "3")
-- Found PythonInterp: /usr/bin/python (found suitable version "3.8.6", minimum required is "3.8.6")
CMake Error at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:577 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.19/Modules/FindSWIG.cmake:138 (find_package_handle_standard_args)
CMakeLists.txt:19 (find_package)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/_skbuild/linux-x86_64-3.8/cmake-build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "/home/pdma2s/.local/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 582, in setup
env = cmkr.configure(cmake_args,
File "/home/pdma2s/.local/lib/python3.8/site-packages/skbuild/cmaker.py", line 229, in configure
raise SKBuildError(
An error occurred while configuring with CMake.
Command:
cmake /tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python -DPYTHON_VERSION_STRING:STRING=3.8.6 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPYTHON_LIBRARY:FILEPATH=/usr/lib/libpython3.8.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/pdma2s/.local/lib/python3.8/site-packages/skbuild/resources/cmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_BUILD_TYPE:STRING=Release
Source directory:
/tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71
Working directory:
/tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/_skbuild/linux-x86_64-3.8/cmake-build
Please see CMake's output for more information.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5tonw7z1/owa-epanet_3b448e6abee14f07a6dcbd1b2fbbbe71/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-od5rmipk/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pdma2s/.local/include/python3.8/owa-epanet Check the logs for full command output.
Is there something I can do to fix this issue?
sorry for the uber-general issue title, but I can find no other way to express the root question I have.
In the other repo, it looks like epanet_py.c
directly wraps and exposes most of the EPANET API, with the addition of an error manager layer. This file is an intermediate API that unpacks error conditions, and then the swig-generated toolkit_wrap.c / toolkit.py
paired functions (in this repo) take care of appropriate type conversions and warning/exception throwing.
So the first question is about the interdependencies. In the EPANET repo:
epanet_py.c
(excluded from normal C build)errormanager.c
(excluded from normal C build)BUILD_PY_LIB
option in CMakeLists.txt to add above files into compilation... these are not needed for the EPANET toolkit/cli compilation or anything, so I'm confused as to where they really belong.
Now the real questions is - is all this necessary? I realize that this is the product of much effort, so I assume that much thought went into this structure. I'm looking for some written history of the events leading up to this, and I'm just not able to string together the narrative from issue-threads and commit messages.
I was under the impression that a major advantage of using SWIG is to automatically handle much of what is being done via these mechanisms by crafting a concise interface file. Does this not pan out in practice? I'm grateful for any background info, links, blogs, or otherwise.
When I was using the python version of OWA-EPANET, I found all functions do not retrieve the integer values of warnings, as it's stated in "README". You know it's hard to check these basically identical warnings. Could there be any methods to analyses the warning throws?
The epanet-python
package contains two Python extension modules epanet.toolkit
and epanet.output
created using SWIG and epanet2.dll
and epanet-output.dll
respectively.
The libraries are built separately and the wrappers are generated, built, and linked with them. The code for epanet2.dll requires some patches prior to the library build.
Initial target is Python 3.6 64 bit. Therefore on Windows the target compiler is Visual Studio 14 2015. This is a hard requirement the packages will not build successfully otherwise. This differs from the current target compiler for the OWA epanet/dev (Visual Studio 15 2017).
Tests are currently written using pytest
.
Hello,
I've been trying to install owa-epanet for windows using the pip install approach and building from source using clion and visual studio.
pip install appears to fail on copying _toolkit.py from lib/_toolkit.py as it was created in lib/release/_toolkit.py.
Best,
Gareth.
Unit tests are in the process of being written. More are needed that specifically target API that creates and deletes model elements.
Running Python 3.8 in a Conda env on Mac OS 11.4.
When I run owa-epanet wheel binary install from pypi I get the following library import error
(py38) michaeltryby@iMac-Pro owa-epanet % pytest
======================================== test session starts =========================================
platform darwin -- Python 3.8.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/michaeltryby/Workspace/OWA/epanet-python/owa-epanet
collected 0 items / 1 error
=============================================== ERRORS ===============================================
______________________________ ERROR collecting test/test_owa_epanet.py ______________________________
ImportError while importing test module '/Users/michaeltryby/Workspace/OWA/epanet-python/owa-epanet/test/test_owa_epanet.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/anaconda3/envs/py38/lib/python3.8/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
/usr/local/anaconda3/envs/py38/lib/python3.8/site-packages/epanet/toolkit.py:13: in <module>
from . import _toolkit
E ImportError: dlopen(/usr/local/anaconda3/envs/py38/lib/python3.8/site-packages/epanet/_toolkit.so, 2): Library not loaded: /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/Python
E Referenced from: /usr/local/anaconda3/envs/py38/lib/python3.8/site-packages/epanet/_toolkit.so
E Reason: image not found
====================================== short test summary info =======================================
ERROR test/test_owa_epanet.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================== 1 error in 0.16s ==========================================
Hell everyone, I ran into an issue with the function in the object.
I guess at line 535, it should be optioncode
instead of paramcode
.
when iterating through a hydraulic simulation using the nextH
-type methods, if there is an epanet-related error like "negative pressures", the stepping call will raise an exception. We can catch it, but we will not get the time
return value from the function (which we need for various reasons).
I see that the toolkit.i
file declares some macros to accomplish both routing of OUTVALUEs to returns, and checking the C toolkit return value to raise, but this is preventing us from using the functions as we desire.
our workaround seems to be changing the swig interface file to avoid raising, or to avoid passing the OUTVALUE as a return so we can retrieve it even if the function raises.
any thoughts?
Could you give an example on the correct way to use the toolkit.createproject method? It does not seem to take arguments or return a project handler
This task involves removing these prefixes using the SWIG %rename
.
The modules in this package are contained within the epanet
namespace. Consequently, prefixes such as EN
are no longer required in the python wrapper. Removing them will improve conformance of the function names with python PEP 8 naming conventions.
After installing owa-epanet on my computer using the code pip install owa-epanet,
I just ran the code python3 setup.py sdist bdist_wheel
, but it returned the error shown below:
`C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\Lib\site-packages\owa-epanet>python setup.py sdist bdist_wheel
--------------------------------------------------------------------------------
-- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is MSVC 19.16.27045.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is MSVC 19.16.27045.0
CMake Warning (dev) at C:/Users/Ziyuan/AppData/Local/Programs/Python/Python37/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/CMakeDetermineCXXCompiler.cmake:157 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:4 (ENABLE_LANGUAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at C:/Users/Ziyuan/AppData/Local/Programs/Python/Python37/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/CMakeDetermineCXXCompiler.cmake:177 (elseif):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:4 (ENABLE_LANGUAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Ziyuan/AppData/Local/Programs/Python/Python37/Lib/site-packages/owa-epanet/_cmake_test_compile/build
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator - success
--------------------------------------------------------------------------------
Configuring Project
Working directory:
C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\Lib\site-packages\owa-epanet\_skbuild\win-amd64-3.7\cmake-build
Command:
cmake 'C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\Lib\site-packages\owa-epanet' -G Ninja '-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\Lib\site-packages\owa-epanet\_skbuild\win-amd64-3.7\cmake-install' '-DPYTHON_EXECUTABLE:FILEPATH=C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\python.exe' -DPYTHON_VERSION_STRING:STRING=3.7.9 '-DPYTHON_INCLUDE_DIR:PATH=C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\Include' '-DPYTHON_LIBRARY:FILEPATH=C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\libs\python37.lib' -DSKBUILD:BOOL=TRUE '-DCMAKE_MODULE_PATH:PATH=C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\lib\site-packages\skbuild\resources\cmake' -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_BUILD_TYPE:STRING=Release
-- The project is built using scikit-build
PYTHONLIBS_VERSION_STRING: 3.7.9
CMAKE_SWIG_FLAGS: -py3
CMake Error at CMakeLists.txt:38 (ADD_SUBDIRECTORY):
The source directory
C:/Users/Ziyuan/AppData/Local/Programs/Python/Python37/Lib/site-packages/owa-epanet/EPANET
does not contain a CMakeLists.txt file.
CMake Warning (dev) at C:/Users/Ziyuan/AppData/Local/Programs/Python/Python37/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/UseSWIG.cmake:634 (message):
Policy CMP0078 is not set: UseSWIG generates standard target names. Run
"cmake --help-policy CMP0078" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
CMakeLists.txt:42 (SWIG_ADD_LIBRARY)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at C:/Users/Ziyuan/AppData/Local/Programs/Python/Python37/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/UseSWIG.cmake:486 (message):
Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
flag. Run "cmake --help-policy CMP0086" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
C:/Users/Ziyuan/AppData/Local/Programs/Python/Python37/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/UseSWIG.cmake:736 (SWIG_ADD_SOURCE_TO_MODULE)
CMakeLists.txt:42 (SWIG_ADD_LIBRARY)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at CMakeLists.txt:44 (set_property):
set_property could not find TARGET epanet2. Perhaps it has not yet been
created.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Ziyuan/AppData/Local/Programs/Python/Python37/Lib/site-packages/owa-epanet/_skbuild/win-amd64-3.7/cmake-build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\lib\site-packages\skbuild\setuptools_wrap.py", line 586, in setup
languages=cmake_languages
File "C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\lib\site-packages\skbuild\cmaker.py", line 240, in configure
os.path.abspath(CMAKE_BUILD_DIR())))
An error occurred while configuring with CMake.
Command:
cmake 'C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\Lib\site-packages\owa-epanet' -G Ninja '-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\Lib\site-packages\owa-epanet\_skbuild\win-amd64-3.7\cmake-install' '-DPYTHON_EXECUTABLE:FILEPATH=C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\python.exe' -DPYTHON_VERSION_STRING:STRING=3.7.9 '-DPYTHON_INCLUDE_DIR:PATH=C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\Include' '-DPYTHON_LIBRARY:FILEPATH=C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\libs\python37.lib' -DSKBUILD:BOOL=TRUE '-DCMAKE_MODULE_PATH:PATH=C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\lib\site-packages\skbuild\resources\cmake' -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_BUILD_TYPE:STRING=Release
Source directory:
C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\Lib\site-packages\owa-epanet
Working directory:
C:\Users\Ziyuan\AppData\Local\Programs\Python\Python37\Lib\site-packages\owa-epanet\_skbuild\win-amd64-3.7\cmake-build
Please see CMake's output for more information`
Could you please give me some ideas about how to fix this issue? Thanks a lot in advance!
The package build is currently performed manually. It requires the epanet-toolkit and epanet-output libraries to be built a priori. The required .dll, .lib, and .h files are then manually copied to the source directory for the module being built. Then the python packaging system is used to build the swig wrapper and create the package. This process need to be automated for easy packaging and distribution of the python modules.
Add support for metadata describing epanet parameters and attributes. Create API for providing units.
Trying to generate whl for py 3.8-32 (python 3.8.5) under Ws7 / VS2019, the chain fails to generate .whl.
The fix consists in removing the 'Release' path chunk from the last two copy commands from /bin/Release and /lib/Release
CMakeLists.txt
I was following the building instructions in the readme at owa-epanet and when preforming pipenv install ../dist /*.whl
I met the following error
C:\Users\lulin\pythonroom\epanet-python\owa-epanet\dist>pipenv install *whl
Installing *whl...
Traceback (most recent call last):
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\packaging\requirements.py", line 98, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\pyparsing.py", line 1654, in parseString
raise exc
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\pyparsing.py", line 1644, in parseString
loc, tokens = self._parse( instring, 0 )
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\pyparsing.py", line 1402, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\pyparsing.py", line 3417, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\pyparsing.py", line 1402, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\pyparsing.py", line 3739, in parseImpl
return self.expr._parse( instring, loc, doActions, callPreParse=False )
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\pyparsing.py", line 1402, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\pyparsing.py", line 3400, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\pyparsing.py", line 1406, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\pyparsing.py", line 2711, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pkg_resources._vendor.pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 966, in _parse_name_from_line
self._requirement = init_requirement(self.line)
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\requirementslib\models\utils.py", line 200, in init_requirement
req = Requirement.parse(name)
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\__init__.py", line 3139, in parse
req, = parse_requirements(s)
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\__init__.py", line 3084, in parse_requirements
yield Requirement(line)
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\__init__.py", line 3094, in __init__
super(Requirement, self).__init__(requirement_string)
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\_vendor\packaging\requirements.py", line 100, in __init__
raise InvalidRequirement(
pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "'*whl'": Expected W:(abcd...)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\lulin\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\lulin\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\lulin\AppData\Local\Programs\Python\Python39\Scripts\pipenv.exe\__main__.py", line 7, in <module>
File "C:\Users\lulin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Users\lulin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "C:\Users\lulin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\lulin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\lulin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Users\lulin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pipenv\vendor\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "C:\Users\lulin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Users\lulin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pipenv\vendor\click\decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pipenv\cli\command.py", line 233, in install
retcode = do_install(
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pipenv\core.py", line 2100, in do_install
pkg_requirement = Requirement.from_line(pkg_line)
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 2676, in from_line
parsed_line = Line(line)
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 171, in __init__
self.parse()
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 1304, in parse
self.parse_name()
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 1027, in parse_name
name = self._parse_name_from_line()
File "c:\users\lulin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 968, in _parse_name_from_line
raise RequirementError(
pipenv.vendor.requirementslib.exceptions.RequirementError: Failed parsing requirement from '*whl'
I hope someone can provide some guidance in how to solve this error.
With several trials, i installed it successfully. Some tips may be useful for you, as listed below.
Is there a way to read time-series results of pumps energy or efficiency using the outbin.py library?
Hey @mauriziocingi I have worked with ctypes, ctypesgen, and now SWIG for integrating our EPANET outputapi library with python. You can see the latest SWIG version here.
I am really happy with how it came out. Using SWIG it is easy to handle memory management, error handling, and best of all the library becomes a fully fledged Python extension. I was thinking about SWIG wrapping the Toolkit API. Is that something that could live in this repo along with your work?
I also created several Python packages related to regression testing that need a home. We are contemplating a bit of a reorganization over in the EPANET repo in Issue #123. Would you be amenable to keeping multiple EPANET related python packages here in your repo? Give it some thought and let us know what your preferences are. Thanks!
issue discovered here:
http://community.wateranalytics.org/t/owa-epanet-python-wrapper-setcurve-issue/1041
I was trying to install owa-epanet library using the code pip install owa-epanet
.
But it returned the error shown below:
C:\Users\Ziyuan>pip install owa-epanet
Collecting owa-epanet
Using cached owa-epanet-2.2.3.tar.gz (800 kB)
Building wheels for collected packages: owa-epanet
Building wheel for owa-epanet (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\ziyuan\appdata\local\programs\python\python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ziyuan\\AppData\\Local\\Temp\\pip-install-q6ub27xj\\owa-epanet_dc5c9205daa9406797dfe7c2d9957cd2\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ziyuan\\AppData\\Local\\Temp\\pip-install-q6ub27xj\\owa-epanet_dc5c9205daa9406797dfe7c2d9957cd2\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Ziyuan\AppData\Local\Temp\pip-wheel-g59ckj0l'
cwd: C:\Users\Ziyuan\AppData\Local\Temp\pip-install-q6ub27xj\owa-epanet_dc5c9205daa9406797dfe7c2d9957cd2\
Complete output (153 lines):
--------------------------------------------------------------------------------
-- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Ziyuan/AppData/Local/Temp/pip-install-q6ub27xj/owa-epanet_dc5c9205daa9406797dfe7c2d9957cd2/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "Visual Studio 15 2017 Win64 v141" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Visual Studio 15 2017 Win64
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Ziyuan/AppData/Local/Temp/pip-install-q6ub27xj/owa-epanet_dc5c9205daa9406797dfe7c2d9957cd2/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Visual Studio 15 2017 Win64 v141" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Ziyuan/AppData/Local/Temp/pip-install-q6ub27xj/owa-epanet_dc5c9205daa9406797dfe7c2d9957cd2/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Ziyuan/AppData/Local/Temp/pip-install-q6ub27xj/owa-epanet_dc5c9205daa9406797dfe7c2d9957cd2/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 Win64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the JOM generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Ziyuan/AppData/Local/Temp/pip-install-q6ub27xj/owa-epanet_dc5c9205daa9406797dfe7c2d9957cd2/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Ziyuan/AppData/Local/Temp/pip-install-q6ub27xj/owa-epanet_dc5c9205daa9406797dfe7c2d9957cd2/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 Win64 v141)" generator - failure
--------------------------------------------------------------------------------
********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.
Building windows wheels for Python 3.7 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":
https://visualstudio.microsoft.com/vs/
********************************************************************************
----------------------------------------
ERROR: Failed building wheel for owa-epanet
Appreicate a lot if any advices!
Just tried out the epanet.output-0.2.0.dev0-cp37-cp37m-win_amd64.whl
in the PyQGIS EPANET ui project (issue 289), it installed correctly, but it is missing some general element count variables such as: ENR_nodeCount
, ENR_linkCount
etc, also, I hope the getnodeseries
, getnodeattribute
, and getnoderesult
in the whl have the same api as the current ENR_get versions in the output api dll.
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 ===================================================
We are currently using SWIG and Python 2.7 for the EPANET Output API. Using the future package we would be able to support Python 2 and 3 and a single Python 3 style code base.
PRs welcome!
In the EPANET source code, EN_setvertices has five arguments:
EN_setvertices(EN_Project ph, int index, double *x, double *y, int count)
In the owa-epanet toolkit, setvertices
is missing the x
and y
arguments and there is no other function that allows these to be set.
def setvertices(ph, index, count):
r"""
setvertices(ph, index, count) -> int
Parameters
----------
ph: EN_Project
index: int
count: int
"""
return _toolkit.setvertices(ph, index, count)
I'm working on a dockerized build for this wrapper - feel free to use if it suits your needs!
https://gist.github.com/samhatchett/f13b098e7ae0cc092e06cc17a4828fc3
Hello,
I am trying to install and use the epamodule in python but so far I had no success.
I tried to install into the terminal, but than I cant find the module at C:\Users\ferna\AppData\Local\Programs\Python\Python37\Lib\site-packages
I also tried to download the version on the github import the epamodule.py from the owa-epanet-2.2.3, but I always get an error
C:\Users\ferna\venv\Python3.7\Scripts\python.exe "C:/Users/ferna/Desktop/AIDE/teste.py"
Traceback (most recent call last):
File "C:/Users/ferna/Desktop/AIDE/teste.py", line 2, in <module>
import epamodule
File "C:\Users\ferna\Desktop\AIDE\epamodule.py", line 130
ierr = _lib.ENsetflowunits(ctypes.c_int(units_code))
^
TabError: inconsistent use of tabs and spaces in indentation
I am sorry for the simple question, but I have no other idea of what I can do.
Thanks very much for the attention
Minor naming and indexing differences between packages should be addressed. For example, toolkit
model elements are indexed starting from 1, while in output
they are indexed starting from 0.
Since both packages are in the epanet
namespace 'EN' prefixes can be stripped from the API. A Python compliant naming convention should be used.
Currently, there appears to be no way to access the headloss model code using the API. Such API would be useful to help correctly interpret the roughness values after having read an input file.
Building owa-epanet wheel locally on Mac OS 11.4 with Python 3.8 running in a Conda env.
The build and install proceed as normal. I get the following error when running pytest
(py38) michaeltryby@iMac-Pro owa-epanet % pytest
======================================== test session starts =========================================
platform darwin -- Python 3.8.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/michaeltryby/Workspace/OWA/epanet-python/owa-epanet
collecting ... Fatal Python error: Segmentation fault
Current thread 0x0000000109d6ce00 (most recent call first):
File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 1166 in create_module
File "<frozen importlib._bootstrap>", line 556 in module_from_spec
File "<frozen importlib._bootstrap>", line 657 in _load_unlocked
File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 991 in _find_and_load
File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1042 in _handle_fromlist
File "/usr/local/anaconda3/envs/py38/lib/python3.8/site-packages/epanet/toolkit.py", line 13 in <module>
...
Currently Toolkit and Output extension modules are organized into separate implicit namespace packages. The modules are most likely going to be used together, so it makes more sense to distribute them as a single package. Therefore the modules should be combined.
I had a chance to review the Issues posted to this repository and it seems like build and install problems have been coming up frequently.
Is there any interest in pivoting from a source distribution to a binary distribution for an EPANET wrapper package?
Over at OWA/swmm-python we recently completed work on a binary distribution for SWMM.
https://github.com/OpenWaterAnalytics/swmm-python/tree/dev/swmm-toolkit
https://pypi.org/project/swmm-toolkit/
It would be straight forward to use swmm-toolkit as a template and create an epanet-toolkit wheel.
Such a wheel would resolve many of the build and install issues Python developers are experiencing here on the EPANET side.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.