You are not logged in.
Hello
I currently use iapws ( international association for properties water & steam ) which is a thermal science application ; it's a python application directly available on Debian distro but not on arch bases distros
I tried to install it through github by makepkg process , but nowhere the file PKGBUILD is included ; then I tried to make it based on a file used for yay install ; anyway , now I have still an error " no rules for pkgbuild ...."
Then my questions :
- what about an installation of an app when not in arch bases nor aur database ?
- is there a possibility to install a .deb in arch ? and how ?
note: iapws github give process to install on debian only .
iapws url :https://github.com/jjgomera/iapws
Last edited by coco45 (2026-02-18 17:17:06)
Equipment:Desktop PC triple-boot Home-common: Arch 21Xfce/ Mint Cinnamon 21 (W7 en VM) + Mx21 Xfce
Proc: Intel Pentium G3220 64b- CM: Gigabyte GA-H81M-HD3 Ram: 8 Go - CG : Intel HD direct X10
DD: Samsung 465 Go
Portable EeePC Asus R105D RAM 1 Go 1,66MHz-64 bits: Arch 20 Lxde/AntiX/Windows7 Starter
Offline
is there a possibility to install a .deb in arch ? and how ?
That can break the system as far as I understand. Arch manages packages only with pacman; using apt or dpkg is not recommended, unlike using pacman + AUR Helper or pacman + flatpak.
what about an installation of an app when not in arch bases nor aur database ?
You can create your own PKGBUILD. Since you say it is a Python package, you can follow these steps: https://wiki.archlinux.org/title/Python … guidelines
You can use the .deb package as a source, but I recommend using the source code for a Python package built from scratch: https://pypi.org/project/iapws/#files There you can see the versions and choose the most recent one.
Last edited by KevinCrrl (2026-02-17 17:37:58)
Offline
Follow the python packing guidelines KevinCrrl linked above:
_pkgname=iapws
pkgname=python-$_pkgname
pkgver=1.5.2
pkgrel=1
pkgdesc="python libray for IAPWS standard calculation of water and steam properties"
arch=(any)
url="https://github.com/jjgomera/$_pkgname"
license=(GPL-3.0-only)
depends=(
python
scipy
)
makedepends=(
git
python-build
python-installer
python-setuptools
python-wheel
)
source=(git+$url#tag=v$pkgver)
sha256sums=('a6dcc3cb94848b8d45fb36a154630db4a9584db6b655b183df443e3ec65d8fbc')
build() {
cd $_pkgname
python -m build --wheel --no-isolation
}
check() {
cd $_pkgname
python test.py
}
package() {
cd $_pkgname
python -m installer --destdir="$pkgdir" dist/*.whl
}Note test will fail as the latest release is not compatible with scipy 1.17.0/numpy 2.4.2 due to removal of numpy aliases from scipy and stricter scalar conversion in numpy. To get test to pass I used the following patch:
diff --git a/iapws/_iapws.py b/iapws/_iapws.py
index 7c6acd4..9575edd 100644
--- a/iapws/_iapws.py
+++ b/iapws/_iapws.py
@@ -29,7 +29,7 @@ Miscelaneous IAPWS standards. This module include:
from __future__ import division
from cmath import log as log_c
-from math import log, exp, tan, atan, acos, sin, pi, log10, copysign
+from numpy import log, exp, tan, atan, arccos as acos, sin, pi, log10, copysign
import warnings
from scipy.optimize import minimize
diff --git a/iapws/humidAir.py b/iapws/humidAir.py
index 70ff7c1..b64dbb8 100644
--- a/iapws/humidAir.py
+++ b/iapws/humidAir.py
@@ -14,7 +14,7 @@ include:
from __future__ import division
-from math import exp, log, pi, atan
+from numpy import exp, log, pi, atan
import warnings
from scipy.optimize import fsolve
diff --git a/iapws/iapws08.py b/iapws/iapws08.py
index bd00e47..a2686c3 100644
--- a/iapws/iapws08.py
+++ b/iapws/iapws08.py
@@ -19,7 +19,7 @@ Other functionality:
"""
from __future__ import division
-from math import exp, log
+from numpy import exp, log, asarray
import warnings
from scipy.optimize import fsolve
@@ -476,7 +476,7 @@ def _Tf(P, S):
Properties of Seawater, http://www.iapws.org/relguide/Advise5.html, Eq 12
"""
def f(T):
- T = float(T)
+ T = float(asarray(T).item())
pw = _Region1(T, P)
gw = pw["h"]-T*pw["s"]
diff --git a/iapws/iapws95.py b/iapws/iapws95.py
index 795c37b..117811c 100644
--- a/iapws/iapws95.py
+++ b/iapws/iapws95.py
@@ -15,7 +15,7 @@ import os
import platform
import warnings
-from scipy import exp, log, ndarray
+from numpy import exp, log, ndarray
from scipy.optimize import fsolve
from .iapws97 import _TSat_P, IAPWS97
diff --git a/iapws/iapws97.py b/iapws/iapws97.py
index 6ac7cff..2cd7f3d 100644
--- a/iapws/iapws97.py
+++ b/iapws/iapws97.py
@@ -83,7 +83,7 @@ doi: 10.1007/978-3-540-74234-0
"""
from __future__ import division
-from math import sqrt, log, exp
+from numpy import sqrt, log, exp
from scipy.optimize import fsolve, newton
Ideally upstream should update iaws to support newer scipy/numpy.
Offline
pkgver=1.5.2
1.5.2 does not appear to be the most recent version; pypi has 1.5.4. A PKGBUILD using that version could be:
_pkgname=iapws
pkgname=python-$_pkgname
pkgver=1.5.4
pkgrel=1
pkgdesc="python libray for IAPWS standard calculation of water and steam properties"
arch=(any)
url="https://github.com/jjgomera/$_pkgname"
license=(GPL-3.0-only)
depends=(
python
scipy
)
makedepends=(
git
python-build
python-installer
python-setuptools
python-wheel
)
source=("https://files.pythonhosted.org/packages/4b/df/3ae2f432b8aefc9e88a684660083cca79b2967c3ec6b59e63c1cf5786322/${_pkgname}-${pkgver}.tar.gz")
sha256sums=('9f0faa39a967d76fc5e5f95f61d922e135453192e02bf875d07242f13d6eaa55')
build() {
cd $_pkgname-$pkgver
python -m build --wheel --no-isolation
}
package() {
cd $_pkgname-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
}I removed the check function because I don't see the test.py file in the pypi version:
$ ls src/iapws-1.5.4/
build dist iapws iapws.egg-info LICENSE MANIFEST.in PKG-INFO README.rst setup.cfg setup.py
$ ls src/iapws-1.5.4/iapws
ammonia.py iapws08.py _iapws97Constants.py _iapws.py _utils.py
humidAir.py iapws95.py iapws97.py __init__.py VERSION
$ find . | grep test
$ find . -name test.py
$ Offline
I removed the check function because I don't see the test.py file in the pypi version:
Why switch to pypi then? https://rfc.archlinux.page/0020-sources … packaging/
Updated patch for 1.5.4/git HEAD:
diff --git a/iapws/humidAir.py b/iapws/humidAir.py
index abe9301..9368479 100644
--- a/iapws/humidAir.py
+++ b/iapws/humidAir.py
@@ -18,7 +18,7 @@ include:
from __future__ import division
-from math import exp, log, pi, atan
+from numpy import exp, log, pi, atan
import warnings
from scipy.optimize import fsolve
diff --git a/iapws/iapws08.py b/iapws/iapws08.py
index ae40d22..0ed941e 100644
--- a/iapws/iapws08.py
+++ b/iapws/iapws08.py
@@ -23,7 +23,7 @@ Other functionality:
"""
from __future__ import division
-from math import exp, log
+from numpy import exp, log, asarray
import warnings
from scipy.optimize import fsolve
@@ -508,7 +508,7 @@ def _Tf(P, S):
Properties of Seawater, http://www.iapws.org/relguide/Advise5.html, Eq 12
"""
def f(T):
- T = float(T)
+ T = float(asarray(T).item())
pw = _Region1(T, P)
gw = pw["h"]-T*pw["s"]
diff --git a/iapws/iapws97.py b/iapws/iapws97.py
index 9586f3d..8631b6a 100644
--- a/iapws/iapws97.py
+++ b/iapws/iapws97.py
@@ -87,7 +87,7 @@ doi: 10.1007/978-3-540-74234-0
"""
from __future__ import division
-from math import sqrt, log, exp
+from numpy import sqrt, log, exp
from scipy.optimize import fsolve, newton
import numpy as np
Last edited by loqs (2026-02-17 19:46:51)
Offline
Why switch to pypi then?
Since I didn't see the tag on GitHub, I only looked at the releases that had the outdated version, in which case the sha256sum would also change.
Last edited by KevinCrrl (2026-02-17 22:11:54)
Offline
thanks you to all and specially to KevinCrrl ; your script works wo problem and it's the last version 1.5.4
Ciaooo
Equipment:Desktop PC triple-boot Home-common: Arch 21Xfce/ Mint Cinnamon 21 (W7 en VM) + Mx21 Xfce
Proc: Intel Pentium G3220 64b- CM: Gigabyte GA-H81M-HD3 Ram: 8 Go - CG : Intel HD direct X10
DD: Samsung 465 Go
Portable EeePC Asus R105D RAM 1 Go 1,66MHz-64 bits: Arch 20 Lxde/AntiX/Windows7 Starter
Offline
your script works wo problem and it's the last version 1.5.4
======================================================================
ERROR: test_HumidAir (__main__.Test.test_HumidAir)
Tables 13-15 from page 19
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/python-iapws/src/iapws/test.py", line 2617, in test_HumidAir
hum5 = HumidAir(P=hum4.P, rho=hum4.rho, xw=hum4.xw)
File "/build/python-iapws/src/iapws/iapws/humidAir.py", line 629, in __init__
self.__call__(**kwargs)
~~~~~~~~~~~~~^^^^^^^^^^
File "/build/python-iapws/src/iapws/iapws/humidAir.py", line 651, in __call__
self.calculo()
~~~~~~~~~~~~^^
File "/build/python-iapws/src/iapws/iapws/humidAir.py", line 697, in calculo
T = fsolve(f, 300)[0]
~~~~~~^^^^^^^^
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 171, in fsolve
res = _root_hybr(_wrapped_func, x0, args, jac=fprime, **options)
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 239, in _root_hybr
shape, dtype = _check_func('fsolve', 'func', func, x0, args, n, (n,))
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 24, in _check_func
res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 159, in _wrapped_func
return func(*fargs)
File "/build/python-iapws/src/iapws/iapws/humidAir.py", line 695, in f
fav = self._fav(T, rho, A)
File "/build/python-iapws/src/iapws/iapws/humidAir.py", line 930, in _fav
fmix = self._fmix(T, rho, A)
File "/build/python-iapws/src/iapws/iapws/humidAir.py", line 997, in _fmix
vir = _virial(T)
File "/build/python-iapws/src/iapws/iapws/humidAir.py", line 124, in _virial
Caww = -1e-6*exp(sum(b/T_**i for i, b in enumerate(bi))) # Eq 9
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: only 0-dimensional arrays can be converted to Python scalars
======================================================================
ERROR: test_IAPWS97_custom (__main__.Test.test_IAPWS97_custom)
Cycle input parameter from selected point for IAPWS97
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/python-iapws/src/iapws/test.py", line 921, in test_IAPWS97_custom
f_px = IAPWS97(P=P, x=0)
File "/build/python-iapws/src/iapws/iapws/iapws97.py", line 3810, in __init__
self.__call__(**kwargs)
~~~~~~~~~~~~~^^^^^^^^^^
File "/build/python-iapws/src/iapws/iapws/iapws97.py", line 3818, in __call__
self.calculo()
~~~~~~~~~~~~^^
File "/build/python-iapws/src/iapws/iapws/iapws97.py", line 4045, in calculo
rho = fsolve(funcion, rhoo)[0]
~~~~~~^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 171, in fsolve
res = _root_hybr(_wrapped_func, x0, args, jac=fprime, **options)
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 239, in _root_hybr
shape, dtype = _check_func('fsolve', 'func', func, x0, args, n, (n,))
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 24, in _check_func
res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 159, in _wrapped_func
return func(*fargs)
File "/build/python-iapws/src/iapws/iapws/iapws97.py", line 4042, in funcion
return _Region3(rho, T)["P"] - P
~~~~~~~~^^^^^^^^
File "/build/python-iapws/src/iapws/iapws/iapws97.py", line 1488, in _Region3
g = (1.0658070028513 * log(d)) + np.sum(Const.Region3_n * d ** Const.Region3_Li * Tr ** Const.Region3_Lj)
~~~^^^
TypeError: only 0-dimensional arrays can be converted to Python scalars
======================================================================
ERROR: test_SeaWaterIF97 (__main__.Test.test_SeaWaterIF97)
Table A1, pag 19-21
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/python-iapws/src/iapws/test.py", line 1787, in test_SeaWaterIF97
self.assertEqual(round(_Tb(0.001, 0), 2), 280.12)
~~~^^^^^^^^^^
File "/build/python-iapws/src/iapws/iapws/iapws08.py", line 484, in _Tb
rinput = fsolve(f, to, full_output=True)
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 171, in fsolve
res = _root_hybr(_wrapped_func, x0, args, jac=fprime, **options)
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 239, in _root_hybr
shape, dtype = _check_func('fsolve', 'func', func, x0, args, n, (n,))
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 24, in _check_func
res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py", line 159, in _wrapped_func
return func(*fargs)
File "/build/python-iapws/src/iapws/iapws/iapws08.py", line 471, in f
pw = _Region1(T, P)
File "/build/python-iapws/src/iapws/iapws/iapws97.py", line 691, in _Region1
propiedades["w"] = sqrt(R * T * 1000 * gp ** 2 / ((gp - Tr * gpt) ** 2 / (Tr ** 2 * gtt) - gpp))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: only 0-dimensional arrays can be converted to Python scalars
----------------------------------------------------------------------
Ran 45 tests in 1.300s
FAILED (errors=3)Offline
TypeError: only 0-dimensional arrays can be converted to Python scalars
Okay, I corrected the PKGBUILD to download the most recent tag from GitHub, not from pypi, where test.py is included, and I also added a prepare() function to apply the loqs patch.
_pkgname=iapws
pkgname=python-$_pkgname
pkgver=1.5.4
pkgrel=1
pkgdesc="python libray for IAPWS standard calculation of water and steam properties"
arch=(any)
url="https://github.com/jjgomera/$_pkgname"
license=(GPL-3.0-only)
depends=(
python
scipy
)
makedepends=(
python-build
python-installer
python-setuptools
python-wheel
)
source=("$url/archive/refs/tags/v$pkgver.tar.gz"
"$_pkgname.patch")
sha256sums=('8d057b65cf159cec76f73e794570d625edfd8a2b32649c6c0625b71d7aa122ed'
'c48a29455913d43355fbfbc5952df3afa637d63729bbb3c016f1809529152999') # replace with the correct sha256sum
prepare() {
cd $_pkgname-$pkgver
patch -Np1 -i ../$_pkgname.patch
}
build() {
cd $_pkgname-$pkgver
python -m build --wheel --no-isolation
}
check() {
cd $_pkgname-$pkgver
python test.py
}
package() {
cd $_pkgname-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
}patch used:
Updated patch for 1.5.4/git HEAD:
diff --git a/iapws/humidAir.py b/iapws/humidAir.py index abe9301..9368479 100644 --- a/iapws/humidAir.py +++ b/iapws/humidAir.py @@ -18,7 +18,7 @@ include: from __future__ import division -from math import exp, log, pi, atan +from numpy import exp, log, pi, atan import warnings from scipy.optimize import fsolve diff --git a/iapws/iapws08.py b/iapws/iapws08.py index ae40d22..0ed941e 100644 --- a/iapws/iapws08.py +++ b/iapws/iapws08.py @@ -23,7 +23,7 @@ Other functionality: """ from __future__ import division -from math import exp, log +from numpy import exp, log, asarray import warnings from scipy.optimize import fsolve @@ -508,7 +508,7 @@ def _Tf(P, S): Properties of Seawater, http://www.iapws.org/relguide/Advise5.html, Eq 12 """ def f(T): - T = float(T) + T = float(asarray(T).item()) pw = _Region1(T, P) gw = pw["h"]-T*pw["s"] diff --git a/iapws/iapws97.py b/iapws/iapws97.py index 9586f3d..8631b6a 100644 --- a/iapws/iapws97.py +++ b/iapws/iapws97.py @@ -87,7 +87,7 @@ doi: 10.1007/978-3-540-74234-0 """ from __future__ import division -from math import sqrt, log, exp +from numpy import sqrt, log, exp from scipy.optimize import fsolve, newton import numpy as np
It should work fine now. Output:
==> Making package: python-iapws 1.5.4-1 (Wed Feb 18 14:31:13 2026)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found v1.5.4.tar.gz
-> Found iapws.patch
==> Validating source files with sha256sums...
v1.5.4.tar.gz ... Passed
iapws.patch ... Passed
==> Extracting sources...
-> Extracting v1.5.4.tar.gz with bsdtar
==> Starting prepare()...
patching file iapws/humidAir.py
patching file iapws/iapws08.py
patching file iapws/iapws97.py
==> Removing existing $pkgdir/ directory...
==> Starting build()...
* Getting build dependencies for wheel...
/usr/lib/python3.14/site-packages/setuptools/dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running egg_info
writing iapws.egg-info/PKG-INFO
writing dependency_links to iapws.egg-info/dependency_links.txt
writing requirements to iapws.egg-info/requires.txt
writing top-level names to iapws.egg-info/top_level.txt
[02/18/26 14:31:16] ERROR listing git files failed - pretending there aren't any git.py:26
reading manifest file 'iapws.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'iapws.egg-info/SOURCES.txt'
* Building wheel...
/usr/lib/python3.14/site-packages/setuptools/dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
running build
running build_py
copying iapws/humidAir.py -> build/lib/iapws
copying iapws/iapws97.py -> build/lib/iapws
copying iapws/iapws08.py -> build/lib/iapws
running egg_info
writing iapws.egg-info/PKG-INFO
writing dependency_links to iapws.egg-info/dependency_links.txt
writing requirements to iapws.egg-info/requires.txt
writing top-level names to iapws.egg-info/top_level.txt
[02/18/26 14:31:17] ERROR listing git files failed - pretending there aren't any git.py:26
reading manifest file 'iapws.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'iapws.egg-info/SOURCES.txt'
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/iapws
copying build/lib/iapws/ammonia.py -> build/bdist.linux-x86_64/wheel/./iapws
copying build/lib/iapws/humidAir.py -> build/bdist.linux-x86_64/wheel/./iapws
copying build/lib/iapws/iapws95.py -> build/bdist.linux-x86_64/wheel/./iapws
copying build/lib/iapws/VERSION -> build/bdist.linux-x86_64/wheel/./iapws
copying build/lib/iapws/_utils.py -> build/bdist.linux-x86_64/wheel/./iapws
copying build/lib/iapws/iapws97.py -> build/bdist.linux-x86_64/wheel/./iapws
copying build/lib/iapws/_iapws97Constants.py -> build/bdist.linux-x86_64/wheel/./iapws
copying build/lib/iapws/__init__.py -> build/bdist.linux-x86_64/wheel/./iapws
copying build/lib/iapws/_iapws.py -> build/bdist.linux-x86_64/wheel/./iapws
copying build/lib/iapws/iapws08.py -> build/bdist.linux-x86_64/wheel/./iapws
running install_egg_info
Copying iapws.egg-info to build/bdist.linux-x86_64/wheel/./iapws-1.5.4-py3.14.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/iapws-1.5.4.dist-info/WHEEL
creating '/home/Kevin/iapws/src/iapws-1.5.4/dist/.tmp-pr5v49u4/iapws-1.5.4-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'iapws/VERSION'
adding 'iapws/__init__.py'
adding 'iapws/_iapws.py'
adding 'iapws/_iapws97Constants.py'
adding 'iapws/_utils.py'
adding 'iapws/ammonia.py'
adding 'iapws/humidAir.py'
adding 'iapws/iapws08.py'
adding 'iapws/iapws95.py'
adding 'iapws/iapws97.py'
adding 'iapws-1.5.4.dist-info/licenses/LICENSE'
adding 'iapws-1.5.4.dist-info/METADATA'
adding 'iapws-1.5.4.dist-info/WHEEL'
adding 'iapws-1.5.4.dist-info/top_level.txt'
adding 'iapws-1.5.4.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built iapws-1.5.4-py3-none-any.whl
==> Starting check()...
test_Air (__main__.Test.test_Air)
Tables A1 & A2, page 363 & 366. ... /home/Kevin/iapws/src/iapws-1.5.4/iapws/humidAir.py:364: RuntimeWarning: invalid value encountered in scalar power
suma += n*Tita**t
ok
test_AirTransport (__main__.Test.test_AirTransport)
Table V, pag 28 ... ok
test_Ammonia (__main__.Test.test_Ammonia)
Selected point front table of pag 42 ... ok
test_AmmoniaVisco (__main__.Test.test_AmmoniaVisco)
Appendix II & III, page 1664 & 1667. ... ok
test_Conductivity (__main__.Test.test_Conductivity)
Selected values from table II ... ok
test_D2O (__main__.Test.test_D2O)
Tables 6-8, page 12-13. ... ok
test_D2O_Tension (__main__.Test.test_D2O_Tension)
Selected values from table 1 ... ok
test_D2O_ThCond (__main__.Test.test_D2O_ThCond) ... ok
test_D2O_Viscosity (__main__.Test.test_D2O_Viscosity) ... ok
test_Dielect (__main__.Test.test_Dielect)
Table 4, pag 8 ... /home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:470: UserWarning: Using extrapolated values
warnings.warn("Using extrapolated values")
ok
test_Helmholtz (__main__.Test.test_Helmholtz)
Table 6 from IAPWS95, pag 14 ... ok
test_Henry (__main__.Test.test_Henry)
Table 6, Henry constants. ... /home/Kevin/iapws/src/iapws-1.5.4/iapws/_iapws.py:1564: UserWarning: Temperature out of data of correlation
warnings.warn("Temperature out of data of correlation")
/home/Kevin/iapws/src/iapws-1.5.4/iapws/_iapws.py:1689: UserWarning: Temperature out of data of correlation
warnings.warn("Temperature out of data of correlation")
ok
test_HumidAir (__main__.Test.test_HumidAir)
Tables 13-15 from page 19 ... /home/Kevin/iapws/src/iapws-1.5.4/iapws/humidAir.py:790: UserWarning: Convergence failed
warnings.warn("Convergence failed")
(array([0.04109972, 1.00000313]), {'nfev': 20, 'fjac': array([[-0.99347915, -0.11401393],
[-0.11401393, 0.99347915]]), 'r': array([-0.50351243, 0. , 0. ]), 'qtf': array([109.2236015 , 12.53593461]), 'fvec': array([-1.09930357e+02, 2.35839634e-03])}, 5, 'The iteration is not making good progress, as measured by the \n improvement from the last ten iterations.')
ok
test_IAPWS95_custom (__main__.Test.test_IAPWS95_custom)
Cycle input parameter from selected point for IAPWS95 ... /home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1772: RuntimeWarning: invalid value encountered in log
fio = Fi0["ao_log"][0]*log(delta)+Fi0["ao_log"][1]*log(tau)
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:945: RuntimeWarning: invalid value encountered in log
Ps = self.R*T*rhol*rhog/(rhol-rhog)*(K+log(rhol/rhog))
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:949: RuntimeWarning: invalid value encountered in log
Jl*(1/rhog-1/rhol)-log(rhol/rhog)-K,
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1175: RuntimeWarning: The number of calls to function has reached maxfev = 600.
rho, T = fsolve(f, [rhoo, To])
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1788: RuntimeWarning: invalid value encountered in log
fio += n*log(1-exp(-tau*t))
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:135: RuntimeWarning: invalid value encountered in scalar power
fird += n*d*delta**(d-1)*tau**t
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:215: RuntimeWarning: invalid value encountered in scalar power
firt += n*t*delta**d*tau**(t-1)
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1788: RuntimeWarning: overflow encountered in exp
fio += n*log(1-exp(-tau*t))
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1789: RuntimeWarning: overflow encountered in exp
fiot += n*t*((1-exp(-t*tau))**-1-1)
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1790: RuntimeWarning: overflow encountered in exp
fiott -= n*t**2*exp(-t*tau)*(1-exp(-t*tau))**-2
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1790: RuntimeWarning: invalid value encountered in scalar multiply
fiott -= n*t**2*exp(-t*tau)*(1-exp(-t*tau))**-2
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:62: RuntimeWarning: invalid value encountered in scalar power
fir += n*delta**d*tau**t
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1347: RuntimeWarning: invalid value encountered in log
Ps = self.R*T*rhol*rhog/(rhol-rhog)*(K+log(rhol/rhog))
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1352: RuntimeWarning: invalid value encountered in log
Jl*(1/rhog-1/rhol)-log(rhol/rhog)-K,
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1009: RuntimeWarning: invalid value encountered in log
Jl*(1/rhog-1/rhol)-log(rhol/rhog)-K,
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1074: RuntimeWarning: invalid value encountered in log
Jl*(1/rhog-1/rhol)-log(rhol/rhog)-K,
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1134: RuntimeWarning: invalid value encountered in log
Ps = self.R*T*rhol*rhog/(rhol-rhog)*(K+log(rhol/rhog))
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1138: RuntimeWarning: invalid value encountered in log
Jl*(1/rhog-1/rhol)-log(rhol/rhog)-K,
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:777: RuntimeWarning: invalid value encountered in log
Ps = self.R*T*rhol*rhog/(rhol-rhog)*(K+log(rhol/rhog))
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:779: RuntimeWarning: invalid value encountered in log
Jl*(1/rhog-1/rhol)-log(rhol/rhog)-K,
ok
test_IAPWS97_1 (__main__.Test.test_IAPWS97_1)
Table 5, pag 9 ... ok
test_IAPWS97_2 (__main__.Test.test_IAPWS97_2)
Table 15, pag 17 ... ok
test_IAPWS97_3 (__main__.Test.test_IAPWS97_3)
Table 33, pag 49 ... ok
test_IAPWS97_3_Sup03 (__main__.Test.test_IAPWS97_3_Sup03)
Test for supplementary 03 for region 3 ... ok
test_IAPWS97_3_Sup04 (__main__.Test.test_IAPWS97_3_Sup04)
Test for supplementary 04 for region 3 ... ok
test_IAPWS97_3_Sup05 (__main__.Test.test_IAPWS97_3_Sup05)
Test for supplementary 05 for region 3 v=f(T,P) ... ok
test_IAPWS97_4 (__main__.Test.test_IAPWS97_4)
Saturation line ... ok
test_IAPWS97_5 (__main__.Test.test_IAPWS97_5)
Table 42, pag 40 ... ok
test_IAPWS97_custom (__main__.Test.test_IAPWS97_custom)
Cycle input parameter from selected point for IAPWS97 ... ok
test_Ice (__main__.Test.test_Ice)
Table 6, pag 12 ... ok
test_LowT (__main__.Test.test_LowT)
Table 3, pag 5 ... /home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:584: RuntimeWarning: The iteration is not making good progress, as measured by the
improvement from the last ten iterations.
rho = fsolve(f, rhoo)[0]
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1538: RuntimeWarning: overflow encountered in exp
fase.fi = exp(estado["fir"]+estado["delta"]*estado["fird"]
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:1555: RuntimeWarning: invalid value encountered in scalar power
fase.w = (self.derivative("P", "rho", "s", fase)*1000)**0.5
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:474: UserWarning: Using extrapolated values and Low-Temperatureextension
warnings.warn("Using extrapolated values and Low-Temperature"
ok
test_Melting (__main__.Test.test_Melting)
Table 3, pag 7 ... ok
test_Refractive (__main__.Test.test_Refractive)
Selected values from table 3, pag 6 ... ok
test_SeaWater (__main__.Test.test_SeaWater)
Table 8, pag 17-19 ... ok
test_SeaWaterIF97 (__main__.Test.test_SeaWaterIF97)
Table A1, pag 19-21 ... /home/Kevin/iapws/src/iapws-1.5.4/iapws/_iapws.py:128: UserWarning: Metastable ice
warnings.warn("Metastable ice")
/home/Kevin/iapws/src/iapws-1.5.4/iapws/_iapws.py:141: UserWarning: Metastable ice in liquid region
warnings.warn("Metastable ice in liquid region")
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws08.py:374: UserWarning: Incoming out of bound
warnings.warn("Incoming out of bound")
/home/Kevin/iapws/src/iapws-1.5.4/iapws/_iapws.py:136: UserWarning: Metastable ice in vapor region
warnings.warn("Metastable ice in vapor region")
ok
test_SeaWater_supp (__main__.Test.test_SeaWater_supp)
Table 6, pag 9 ... ok
test_SeaWater_tension (__main__.Test.test_SeaWater_tension)
Table 2, pag 4 ... ok
test_SeaWater_thcond (__main__.Test.test_SeaWater_thcond)
Table 2, pag 5 ... /home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws08.py:252: RuntimeWarning: invalid value encountered in scalar power
self.w = prop["gp"]*(prop["gtt"]*1000/(
/home/Kevin/iapws/src/iapws-1.5.4/iapws/iapws95.py:470: UserWarning: Using extrapolated values
warnings.warn("Using extrapolated values")
ok
test_Tension (__main__.Test.test_Tension)
Selected values from table 1 ... ok
test_ThCond (__main__.Test.test_ThCond)
Table 4, pag 10 ... ok
test_Viscosity_1 (__main__.Test.test_Viscosity_1)
Table 4, pag 8 ... ok
test_auxiliarySaturation (__main__.Test.test_auxiliarySaturation)
Table 1 pag 7 ... ok
test_critNaCl (__main__.Test.test_critNaCl)
Table II, page 6 ... ok
test_kw (__main__.Test.test_kw)
Table 3, pag 5 ... ok
test_liquid (__main__.Test.test_liquid)
Table 8, pag 11 ... ok
test_na2so4 (__main__.Test.test_na2so4)
Selected point from Table 1, pag 5 ... ok
test_nh3h2o (__main__.Test.test_nh3h2o)
Test outstanding problems in H2ONH3. ... ok
test_phase (__main__.Test.test_phase)
Table 7 from IAPWS95, pag 14 ... ok
test_saturation (__main__.Test.test_saturation)
Table 8 from IAPWS95, pag 14 ... ok
test_superCooled (__main__.Test.test_superCooled)
Table 5, pag 9 ... ok
test_virial (__main__.Test.test_virial)
Tables 7 & 8, page 10 ... ok
----------------------------------------------------------------------
Ran 45 tests in 5.713s
OK
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
-> Removing libtool files...
-> Purging unreproducible ruby files...
-> Removing static library files...
-> Purging unwanted files...
-> Stripping unneeded symbols from binaries and libraries...
-> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "python-iapws"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: python-iapws 1.5.4-1 (Wed Feb 18 14:31:30 2026)Offline
Hello I discover a matter on my iapws app in some case - when pressure if higher than 165bar - (as it's a specific region of thewater /steam properties ) ; the output is as follow :
TypeError: only 0-dimensional arrays can be converted to Python scalars After some search on the web it could be related to a dependence managing numbers forms ?
As I have not this problem on a distro Mx -where iapws is directly availbale in repo - I suppose it could be due to some parameters of the file PKGBUILD ?
Is it possible to add other dependencies such as numpy or other in the PKGBUILD ?
Equipment:Desktop PC triple-boot Home-common: Arch 21Xfce/ Mint Cinnamon 21 (W7 en VM) + Mx21 Xfce
Proc: Intel Pentium G3220 64b- CM: Gigabyte GA-H81M-HD3 Ram: 8 Go - CG : Intel HD direct X10
DD: Samsung 465 Go
Portable EeePC Asus R105D RAM 1 Go 1,66MHz-64 bits: Arch 20 Lxde/AntiX/Windows7 Starter
Offline
Is it possible to add other dependencies such as numpy or other in the PKGBUILD ?
Yes, it's possible, just modify the depends array in the PKGBUILD and add the missing packages needed by iapws, for example, if the PKGBUILD is:
depends=(
python
scipy
)You can add numpy and other packages:
depends=(
python
scipy
python-numpy
)You can read this page: https://wiki.archlinux.org/title/PKGBUILD and especially the section: https://wiki.archlinux.org/title/PKGBUILD#Dependencies
Also, you can bump the pkgrel if you are installing a rebuild and not a new version.
I suppose it could be due to some parameters of the file PKGBUILD ?
Could you share the part that's causing the error and the full output?
Last edited by KevinCrrl (2026-05-06 13:53:24)
Offline
here the complete error msg
TypeError Traceback (most recent call last)
File ~/Documents/Emile/MyHmK/steam-liquid1.py:16
14 ts = iapws.iapws97._TSat_P(p)
15 try:
---> 16 sat_steam = IAPWS97(P = p, x = 1)
17 except NotImplementedError:
18 print('')
File /usr/lib/python3.14/site-packages/iapws/iapws97.py:3810, in IAPWS97.__init__(self, **kwargs)
3808 def __init__(self, **kwargs):
3809 self.kwargs = IAPWS97.kwargs.copy()
-> 3810 self.__call__(**kwargs)
File /usr/lib/python3.14/site-packages/iapws/iapws97.py:3818, in IAPWS97.__call__(self, **kwargs)
3816 if self.calculable:
3817 self.status = 1
-> 3818 self.calculo()
3819 self.msg = "Solved"
File /usr/lib/python3.14/site-packages/iapws/iapws97.py:4045, in IAPWS97.calculo(self)
4042 return _Region3(rho, T)["P"] - P
4044 rhoo = 1. / _Backward3_sat_v_P(P, T, x)
-> 4045 rho = fsolve(funcion, rhoo)[0]
4046 propiedades = _Region3(rho, T)
4047 elif P == Pc and 0 <= x <= 1:
File /usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py:171, in fsolve(func, x0, args, fprime, full_output, col_deriv, xtol, maxfev, band, epsfcn, factor, diag)
161 _wrapped_func.nfev = 0
163 options = {'col_deriv': col_deriv,
164 'xtol': xtol,
165 'maxfev': maxfev,
(...) 168 'factor': factor,
169 'diag': diag}
--> 171 res = _root_hybr(_wrapped_func, x0, args, jac=fprime, **options)
172 res.nfev = _wrapped_func.nfev
174 if full_output:
File /usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py:239, in _root_hybr(func, x0, args, jac, col_deriv, xtol, maxfev, band, eps, factor, diag, **unknown_options)
237 if not isinstance(args, tuple):
238 args = (args,)
--> 239 shape, dtype = _check_func('fsolve', 'func', func, x0, args, n, (n,))
240 if epsfcn is None:
241 epsfcn = finfo(dtype).eps
File /usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py:24, in _check_func(checker, argname, thefunc, x0, args, numinputs, output_shape)
22 def _check_func(checker, argname, thefunc, x0, args, numinputs,
23 output_shape=None):
---> 24 res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))
25 if (output_shape is not None) and (shape(res) != output_shape):
26 if (output_shape[0] != 1):
File /usr/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py:159, in fsolve.<locals>._wrapped_func(*fargs)
154 """
155 Wrapped `func` to track the number of times
156 the function has been called.
157 """
158 _wrapped_func.nfev += 1
--> 159 return func(*fargs)
File /usr/lib/python3.14/site-packages/iapws/iapws97.py:4042, in IAPWS97.calculo.<locals>.funcion(rho)
4041 def funcion(rho):
-> 4042 return _Region3(rho, T)["P"] - P
File /usr/lib/python3.14/site-packages/iapws/iapws97.py:1488, in _Region3(rho, T)
1485 d = rho / rhoc
1486 Tr = Tc / T
-> 1488 g = (1.0658070028513 * log(d)) + np.sum(Const.Region3_n * d ** Const.Region3_Li * Tr ** Const.Region3_Lj)
1489 gd = (1.0658070028513 / d) + np.sum(
1490 Const.Region3_n_Li_product * d ** Const.Region3_Li_less_1 * Tr ** Const.Region3_Lj)
1491 gdd = (-1.0658070028513 / d ** 2) + np.sum(
1492 Const.Region3_n_Li_product * Const.Region3_Li_less_1 * d ** (
1493 Const.Region3_Li_less_2) * Tr ** Const.Region3_Lj)
TypeError: only 0-dimensional arrays can be converted to Python scalarsthis happens only for pressure beyond 165 bar
Equipment:Desktop PC triple-boot Home-common: Arch 21Xfce/ Mint Cinnamon 21 (W7 en VM) + Mx21 Xfce
Proc: Intel Pentium G3220 64b- CM: Gigabyte GA-H81M-HD3 Ram: 8 Go - CG : Intel HD direct X10
DD: Samsung 465 Go
Portable EeePC Asus R105D RAM 1 Go 1,66MHz-64 bits: Arch 20 Lxde/AntiX/Windows7 Starter
Offline
Try rebuilding the package using pkgrel and the updated dependencies. It's also important that you use the patch shown above, as this patch resolves the issue. Save the patch with the same name used in the pkgbuild: iapws.patch
You can use updpkgsums from the pacman-contrib package for write automatically the patch sha256sum or do it manually.
Note that the error you're getting is the same one that occurred above when the patch wasn't applied (an error in my build logic that @loqs corrected).
Offline