run koopmans

9 views
Skip to first unread message

Mohammad Maymoun

unread,
May 21, 2025, 10:49:55 AMMay 21
to koopmans-users
Dear Users,

I hope you are well.

 I created a virtual environment and activated it. Then, I installed Koopmans's code.

When I ran the code using Koopmans' ozone.json,

I get this error:
Traceback (most recent call last):
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/scipy/__init__.py", line 86, in <module>
    from scipy._lib._ccallback import LowLevelCallable
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/scipy/_lib/_ccallback.py", line 1, in <module>
    from . import _ccallback_c
  File "_ccallback_c.pyx", line 205, in init scipy._lib._ccallback_c
  File "/home/maymoun/python-3.10/lib/python3.10/ctypes/__init__.py", line 8, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/maymoun/koopmans-env/bin/koopmans", line 5, in <module>
    from koopmans.cli.main import main
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/koopmans/cli/main.py", line 10, in <module>
    from koopmans.io import read
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/koopmans/io/__init__.py", line 8, in <module>
    from ._generic import read, write
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/koopmans/io/_generic.py", line 12, in <module>
    from koopmans.utils import chdir
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/koopmans/utils/__init__.py", line 10, in <module>
    from ._io import (construct_atomic_positions_block,
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/koopmans/utils/_io.py", line 19, in <module>
    from ase.atoms import Atoms
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/ase/__init__.py", line 25, in <module>
    from ase.atoms import Atoms
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/ase/atoms.py", line 20, in <module>
    from ase.constraints import FixConstraint, FixBondLengths, FixLinearTriatomic
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/ase/constraints.py", line 8, in <module>
    from scipy.linalg import expm, logm
  File "/home/maymoun/koopmans-env/lib/python3.10/site-packages/scipy/__init__.py", line 91, in <module>
    raise ImportError(msg) from e
ImportError: The `scipy` install you are using seems to be broken, (extension modules cannot be imported), please try reinstalling.


I would appreciate your assistance in resolving this issue.

Edward Linscott

unread,
May 21, 2025, 10:55:50 AMMay 21
to koopmans-users
Dear Mohammad,
The `_ctypes` module is part of Python's standard library, so the fact it is missing suggests there is something wrong with your version of python, which is very unusual. (Perhaps you installed it yourself?) I suggest you try installing libffi-dev and then re-installing python.
Happy to help,
Edward
Reply all
Reply to author
Forward
0 new messages