[ase-users] ase test fails: imp module is deprecated
gdonval at pm.me
gdonval at pm.me
Tue Dec 22 17:21:12 CET 2020
Dear Simon,
The command 'ase test' considers all warnings as errors. This is helping a lot for server-side tests.
The actual problem is that the 'imp' module is deemed deprecated by your flavour of Python 3.6 while 'distutils' (a standard module of that very same Python 3.6) is using it.
The right way to solve the problem is to update Python to something more up-to-date (Gpaw will need to be recompiled if you are using it).
Alternatively, you can remove the "error" line under "filterwarnings" in your local ase/ase/test/pytest.ini and test again. Warnings won't be converted to error then. There should be an equivalent command-line flag (that you can pass at the end of 'ase test --pytest ...') but I don't know it.
Regards,
Gaël
\-------- Original Message --------
On 22 Dec 2020, 15:27, Simon Beyer via ase-users < ase-users at listserv.fysik.dtu.dk> wrote:
P \{margin-top:0;margin-bottom:0;\}
Hello ASE community,
I installed ASE on Amazon Web Space according to the installation description and added the ASE path an ASE-GUI path to the according path variables.
When I run 'ase test' or 'python3 -m ase test' I get the following error:
/shared/gpaw$ python3 -m ase test
About to run pytest with these parameters:
\-v
\--numprocesses=4
ImportError while loading conftest '/shared/gpaw/gpaw/lib/python3.6/site-packages/ase/test/conftest.py'.
../\_\_init\_\_.py:7: in <module>
from distutils.version import LooseVersion
../../../distutils/\_\_init\_\_.py:4: in <module>
import imp
../../../imp.py:33: in <module>
DeprecationWarning, stacklevel=2)
E DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
Do you know what I have to do in order to get the test running?
Here is the output of 'pip3 list':
/shared/gpaw$ pip3 list
Package Version
\------------------- -------
apipkg 1.5
ase 3.20.1
attrs 20.3.0
click 7.1.2
configparser 5.0.1
cycler 0.10.0
execnet 1.7.1
flake8-import-order 0.18.1
Flask 1.1.2
importlib-metadata 2.1.0
imps 0.2.6
iniconfig 1.1.1
itsdangerous 1.1.0
Jinja2 2.11.2
kiwisolver 1.3.1
MarkupSafe 1.1.1
matplotlib 3.3.3
numpy 1.19.4
packaging 20.8
Pillow 8.0.1
pip 20.3.3
pkg-resources 0.0.0
pluggy 0.13.1
py 1.10.0
pycodestyle 2.6.0
pyparsing 2.4.7
pytest 6.1.2
pytest-forked 1.3.0
pytest-xdist 2.2.0
python-dateutil 2.8.1
scipy 1.5.4
setuptools 50.3.2
six 1.15.0
spglib 1.16.0
toml 0.10.2
typing-extensions 3.7.4.3
Werkzeug 1.0.1
wheel 0.36.2
zipp 3.4.0
Best regards,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20201222/d8758534/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 294 bytes
Desc: OpenPGP digital signature
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20201222/d8758534/attachment-0001.sig>
More information about the ase-users
mailing list