[nmag-users] No module named pyvtk

190 views
Skip to first unread message

Liu, Tianyu (MU-Student)

unread,
Mar 22, 2015, 3:25:51 PM3/22/15
to nmag-...@lists.soton.ac.uk

Dear All,


I am a new user to Nmag and Linux, so I use the VMware player to run the latest nmag package. When I tried to visualize the result of Example1, I got an error said "No module named pyvtk". I have also tried to install the pyvtk package, but failed. Could anyone help me out? Herein the attachment is the commands I have used.




Thanks,

Tianyu

nmagpp import error

Weiwei Wang

unread,
Mar 22, 2015, 4:01:19 PM3/22/15
to Liu, Tianyu (MU-Student), nmag-...@lists.soton.ac.uk
Hi Tianyu,

It seems a root privilege is needed to install pyvtk, so you can install pyvtk by

    >sudo python setup.py install

another choice to install python packages is to use pip, (https://pypi.python.org/pypi/pip), once you have pip, you can install pyvtk by,

    >sudo pip install pyvtk

or install pyvtk locally without root privileges,

  >pip install pyvtk --user

Best wishes,
Weiwei

Liu, Tianyu (MU-Student)

unread,
Mar 22, 2015, 4:03:51 PM3/22/15
to Weiwei Wang, nmag-...@lists.soton.ac.uk

Hi Weiwei,


Thank you very much for the prompt reply. The sudo command works.


Best,

Tianyu


From: Weiwei Wang <wangw...@gmail.com>
Sent: Sunday, March 22, 2015 1:59 PM
To: Liu, Tianyu (MU-Student)
Cc: nmag-...@lists.soton.ac.uk
Subject: Re: [nmag-users] No module named pyvtk
 
Reply all
Reply to author
Forward
0 new messages