Dear Anton, Thanks, I have added the lines into the script, and it is: import kwant import scipy.sparse.linalg import scipy.linalg import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt import sympy from kwant.continuum.discretizer import discretize,discretize_symbolic, build_discretized from kwant.continuum._common import sympify, lambdify from kwant.continuum._common import momentum_operators, position_operators
The information I got: Traceback (most recent call last): File "C:\Python36\lib\site-packages\sympy\__init__.py", line 18, in <module> import mpmath ModuleNotFoundError: No module named 'mpmath' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\QingtianZhang\Desktop\discretize(1).py", line 20, in <module> import sympy File "C:\Python36\lib\site-packages\sympy\__init__.py", line 20, in <module> raise ImportError("SymPy now depends on mpmath as an external library. " ImportError: SymPy now depends on mpmath as an external library. See http://docs.sympy.org/latest/install.html#mpmath for more information. I have installed Kwant1.3 on my laptop and got the same error message for tutorial 2.10. Best, Qingtian 2017-06-11 22:26 GMT+08:00 Anton Akhmerov <anton.akhmerov...@gmail.com>: > Dear Qingtian, > > This is very weird. Can you please try running a script with the > following lines: > > import sympy > from kwant.continuum.discretizer import discretize, > discretize_symbolic, build_discretized > from kwant.continuum._common import sympify, lambdify > from kwant.continuum._common import momentum_operators, position_operators > > If I understand correctly, these should fail with a more informative error. > > Best, > Anton > > On Thu, Jun 8, 2017 at 10:30 AM, Qingtian Zhang > <qtzh...@mail.ustc.edu.cn> wrote: > > Dear all, > > I have installed Kwant 1.3 on my computer according to the instructions, > > but i got some error message when i ran the source code for tutorial > 2.10. I > > can run all the other source codes for tutorials 2.7-2.9. The information > > for my pc is: Microsoft Windows 7, 64-bit. Python 3.6. > > > > The message I got: > > Traceback (most recent call last): > > File "C:\Users\QingtianZhang\Desktop\discretize(1).py", line 196, in > > <module> > > main() > > File "C:\Users\QingtianZhang\Desktop\discretize(1).py", line 183, in > main > > template = kwant.continuum.discretize('k_x * A(x) * k_x') > > File "C:\Python36\lib\site-packages\kwant\_common.py", line 61, in > > __getattr__ > > raise RuntimeError(msg.format(self.name, self.dependencies)) > > RuntimeError: 'kwant.continuum' is not available because one or more of > the > > following dependencies are not installed: sympy > > > > I have downloaded 13 packages and installed all of them using pip: > > cycler-0.10.0-py2.py3-none-any > > kwant-1.3.1-cp36-cp36m-win_amd64 > > matplotlib-2.0.2-cp36-cp36m-win_amd64 > > numpy-1.13.0rc2+mkl-cp36-cp36m-win_amd64 > > pyparsing-2.2.0-py2.py3-none-any > > pytest-3.1.1-py2.py3-none-any > > python_dateutil-2.6.0-py2.py3-none-any > > pytz-2017.2-py2.py3-none-any > > scipy-0.19.0-cp36-cp36m-win_amd64 > > setuptools-35.0.2-py2.py3-none-any > > six-1.10.0-py2.py3-none-any > > sympy-1.0-py2.py3-none-any > > tinyarray-1.2.0-cp36-cp36m-win_amd64 > > > > I have tried to install sympy again using: > > C:\Users\QingtianZhang>cd c:\Kwant13 > > c:\Kwant13>pip3 install --no-deps sympy-1.0-py2.py3-none-any.whl > > Requirement already satisfied: sympy==1.0 from > file:///C:/Kwant13/sympy-1.0- > > py2. > > py3-none-any.whl in c:\python36\lib\site-packages > > > > It shows that i have already installed sympy. > > How to fix this? > > Sincerely, > > Qingtian Zhang > > > > > > >