pyprocar icon indicating copy to clipboard operation
pyprocar copied to clipboard

No module named 'pyvista.core.utilities' while the system has pyvista already.

Open ChenqiangHua opened this issue 11 months ago • 2 comments

Dear,

After run the 'pyprocar.bandsplot( XXXXXXXXX )', it gets: %%%%%%%%%%%%%%%%%% Traceback (most recent call last): File "/beegfs/home/b00004/calculation-hcq/Pbsquare=Ge1-10/3Lsub/surfaceH/scf/soc/band/G-X-G/py", line 1, in import pyprocar File "/beegfs/home/b00004/anaconda3/lib/python3.9/site-packages/PyProcar-6.1.8-py3.9.egg/pyprocar/init.py", line 12, in from .scripts import * File "/beegfs/home/b00004/anaconda3/lib/python3.9/site-packages/PyProcar-6.1.8-py3.9.egg/pyprocar/scripts/init.py", line 3, in from .scriptBandsDosplot import bandsdosplot File "/beegfs/home/b00004/anaconda3/lib/python3.9/site-packages/PyProcar-6.1.8-py3.9.egg/pyprocar/scripts/scriptBandsDosplot.py", line 13, in from .scriptDosplot import dosplot File "/beegfs/home/b00004/anaconda3/lib/python3.9/site-packages/PyProcar-6.1.8-py3.9.egg/pyprocar/scripts/scriptDosplot.py", line 17, in from ..plotter import DOSPlot File "/beegfs/home/b00004/anaconda3/lib/python3.9/site-packages/PyProcar-6.1.8-py3.9.egg/pyprocar/plotter/init.py", line 4, in from .fermi3d_plot import FermiDataHandler,FermiVisualizer File "/beegfs/home/b00004/anaconda3/lib/python3.9/site-packages/PyProcar-6.1.8-py3.9.egg/pyprocar/plotter/fermi3d_plot.py", line 14, in from pyvista.core.utilities import ( ModuleNotFoundError: No module named 'pyvista.core.utilities' %%%%%%%%

but I try to install pyvista, it already exists.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Requirement already satisfied: pyvista in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (0.36.1) Requirement already satisfied: appdirs in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from pyvista) (1.4.4) Requirement already satisfied: vtk in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from pyvista) (9.1.0) Requirement already satisfied: imageio in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from pyvista) (2.9.0) Requirement already satisfied: pillow in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from pyvista) (8.4.0) Requirement already satisfied: scooby>=0.5.1 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from pyvista) (0.6.0) Requirement already satisfied: numpy in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from pyvista) (1.22.4) Requirement already satisfied: matplotlib>=2.0.0 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from vtk->pyvista) (3.8.0) Requirement already satisfied: wslink>=1.0.4 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from vtk->pyvista) (1.7.0) Requirement already satisfied: fonttools>=4.22.0 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (4.25.0) Requirement already satisfied: contourpy>=1.0.1 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (1.1.1) Requirement already satisfied: kiwisolver>=1.0.1 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (1.3.1) Requirement already satisfied: packaging>=20.0 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (21.0) Requirement already satisfied: pyparsing>=2.3.1 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (3.0.4) Requirement already satisfied: importlib-resources>=3.2.0 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (6.1.0) Requirement already satisfied: python-dateutil>=2.7 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (2.8.2) Requirement already satisfied: cycler>=0.10 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (0.10.0) Requirement already satisfied: six in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from cycler>=0.10->matplotlib>=2.0.0->vtk->pyvista) (1.16.0) Requirement already satisfied: zipp>=3.1.0 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from importlib-resources>=3.2.0->matplotlib>=2.0.0->vtk->pyvista) (3.6.0) Requirement already satisfied: aiohttp<4 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from wslink>=1.0.4->vtk->pyvista) (3.8.1) Requirement already satisfied: frozenlist>=1.1.1 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from aiohttp<4->wslink>=1.0.4->vtk->pyvista) (1.3.1) Requirement already satisfied: multidict<7.0,>=4.5 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from aiohttp<4->wslink>=1.0.4->vtk->pyvista) (6.0.2) Requirement already satisfied: yarl<2.0,>=1.0 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from aiohttp<4->wslink>=1.0.4->vtk->pyvista) (1.8.1) Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from aiohttp<4->wslink>=1.0.4->vtk->pyvista) (2.0.4) Requirement already satisfied: attrs>=17.3.0 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from aiohttp<4->wslink>=1.0.4->vtk->pyvista) (21.2.0) Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from aiohttp<4->wslink>=1.0.4->vtk->pyvista) (4.0.2) Requirement already satisfied: aiosignal>=1.1.2 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from aiohttp<4->wslink>=1.0.4->vtk->pyvista) (1.2.0) Requirement already satisfied: idna>=2.0 in /beegfs/home/b00004/anaconda3/lib/python3.9/site-packages (from yarl<2.0,>=1.0->aiohttp<4->wslink>=1.0.4->vtk->pyvista) (3.2) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Even I pip uninstall the pyprocar and install again by 'python setup.py install' using source file.

How can I fix this problems?

ChenqiangHua avatar Mar 19 '24 06:03 ChenqiangHua

Hey,

sorry for the late response. This is happening because we do not support pyvista==0.36.1 anymore. In newer versions, they changed their repository structure, which is why we made the change in our code.

To upgrade pyvitsa to the most recent version try: pip install pyvista --upgrade

This should install the most recent version of pyvista, which is version 0.43.4

Logan

lllangWV avatar Mar 25 '24 21:03 lllangWV

Thanks a lot! it is fixed using new version of pyvista. But new error occurs when I run the script using python plot.py

File "/beegfs/home/b00004/calculation-hcq/plot.py", line 2, in pyprocar.bandsplot('PROCAR',outcar='OUTCAR',elimit=[-0.35,0.35],kticks=[0,69,139],knames=['X','GM','Y'],code='vasp',cmap='bwr',mode='parametric',spin=3, savefig='Sz.eps') TypeError: bandsplot() got multiple values for argument 'code'

Thanks!

ChenqiangHua avatar May 12 '24 09:05 ChenqiangHua