I managed to install kwant successfully through git clone on ubuntu 24 LTS with 
Python 3.13 using these steps 
these are the steps someone else may find useful 

sudo apt-get install python3-dev python3-setuptools python3-scipy 
python3-matplotlib python3-pytest python3-sympy g++ gfortran libmumps-scotch-dev

sudo apt-get install build-essential gfortran libopenblas-dev liblapack-dev 
libmumps-scotch-dev

pip install cython pytest

git clone https://gitlab.kwant-project.org/kwant/kwant.git kwant/kwant.git

cd kwant/kwant.git


pip install -e . 

pip list | grep kwant   ( gives the following output) 

kwant                     1.5.0.dev4+g442b296 /home/q/Q03/kwant/kwant/kwant.git


Running the test   

python3 -c 'import kwant; kwant.test()'
produces this output -
6 test errors, 470 tests passed  

Will give it a try 
=========================== short test summary info ============================
FAILED 
kwant/kwant.git/kwant/continuum/tests/test_discretizer.py::test_integer_float_input
 - assert {(0, 0, 0): 1.00000000000000} == {(0, 0, 0): 1}
FAILED kwant/kwant.git/kwant/physics/tests/test_gauge.py::test_unfixable_gauge 
- AttributeError: 'lil_matrix' object has no attribute 'A'
FAILED 
kwant/kwant.git/kwant/tests/test_plotter.py::test_matplotlib_backend_unset - 
assert True is False
FAILED kwant/kwant.git/kwant/tests/test_plotter.py::test_matplotlib_plot - 
TypeError: Axes3D.auto_scale_xyz() missing 2 required positional arguments:...
FAILED kwant/kwant.git/kwant/tests/test_plotter.py::test_spectrum[matplotlib] - 
TypeError: can only concatenate tuple (not "list") to tuple
FAILED kwant/kwant.git/kwant/tests/test_wraparound.py::test_plot_2d_bands - 
TypeError: can only concatenate tuple (not "list") to tuple
=========== 6 failed, 470 passed, 1 skipped, 3534 warnings in 22.21s ===========

Reply via email to