Dear Shizeng, The error messages indicate that the compilation didn't work successfully. While I'm not entirely sure what goes wrong, I'd like to suggest a simpler alternative. If you are using anaconda on a *nix system, the most straightforward way to obtain kwant is to use kwant provided via the community-maintained conda-forge channel. Just execute
conda install -c conda-forge kwant and you are done. Best, Anton On Tue, Jan 3, 2017 at 10:51 PM, Shizeng Lin <[email protected]> wrote: > Hi, > I try to install kwant on a supercomputer in my institute. I do not > have root access, so I built the package from source. > I am using python/3.5-anaconda-4.1.1. > I installed tinyarray and kwant as a user module, with the following command > > pip install --user tinyarray/ > pip install --user kwant/ > > The installation completed successfully. > > But when I try to run the test > > python -c 'import kwant; kwant.test()' > > I got the following error message: > > ========================Error message========================= > Traceback (most recent call last): > > File "/turquoise/users/shizeng/kwant/kwant/__init__.py", line 14, in > <module> > > from . import _system > > ImportError: cannot import name '_system' > > > During handling of the above exception, another exception occurred: > > > Traceback (most recent call last): > > File "<string>", line 1, in <module> > > File "/turquoise/users/shizeng/kwant/kwant/__init__.py", line 22, in > <module> > > raise ImportError(msg) > > ImportError: Error importing Kwant: > > You should not try to import Kwant from its source directory. > > Please exit the Kwant source distribution directory, and relaunch > > your Python intepreter from there. > > ==========================End================================= > I followed the instruction to launch the test at different directory. > but still got the same error message. I am appreciated if someone can > help me to figure out the problem. > Thanks. > Shizeng
