ModuleNotFoundError: No module named 'paraview'

(base) rameshkolluru@lichfield:~$ pvpython
pvpython      pvpython3.10  
(base) rameshkolluru@lichfield:~$ pvpython3.10 
hwloc/linux: Ignoring PCI device with non-16bit domain.
Pass --enable-32bits-pci-domain to configure to support such devices
(warning: it would break the library ABI, don't enable unless really needed).
hwloc/linux: Ignoring PCI device with non-16bit domain.
Pass --enable-32bits-pci-domain to configure to support such devices
(warning: it would break the library ABI, don't enable unless really needed).
Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from paraview.simple import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'paraview'
>>> 
(base) rameshkolluru@lichfield:~$ 

I am trying to run script generated by paraview trace option… when I use pvpython I am getting the following
can anyone help me

Hi @Ramesh_Kolluru ,

How do you install paraview/pvpython ?

Paraview I had installed using the default package manager in popos.

Please try with our binary release: https://www.paraview.org/download/?version=v5.10&filter=Linux

What would be the difference between them? Could you please elaborate why this issue is popping out?

Our binary release works.

Could you please elaborate why this issue is popping out?

Thats a question for popos package managers.

I tired installing from binaires but it fails at this point with the following error… can you help how to get out with this

  • Up-to-date: /opt/paraview-5.10.1/install/lib/cmake/llvm/./FindSphinx.cmake
    [ 77%] Completed ‘llvm’
    [ 78%] Built target llvm
    [ 79%] Built target glproto-download
    [ 79%] Built target glproto-update
    [ 79%] Built target glproto-patch
    [ 79%] Built target glproto
    [ 79%] Built target expat-download
    [ 79%] Built target expat-update
    [ 79%] Built target expat-patch
    [ 80%] Built target expat
    [ 80%] Built target pythonmako-download
    [ 80%] Built target pythonmako-update
    [ 81%] Built target pythonmako-patch
    [ 82%] Built target pythonmako
    [ 83%] Built target ninja-download
    [ 83%] Built target ninja-update
    [ 83%] Built target ninja-patch
    [ 83%] Built target ninja
    [ 83%] Built target meson-download
    [ 83%] Built target meson-update
    [ 84%] Built target meson-patch
    [ 85%] Built target meson
    [ 85%] Built target mesa-download
    [ 85%] Built target mesa-update
    [ 85%] Built target mesa-patch
    [ 85%] Performing configure step for ‘mesa’
    The Meson build system
    Version: 0.60.3
    Source dir: /opt/paraview-5.10.1/superbuild/mesa/src
    Build dir: /opt/paraview-5.10.1/superbuild/mesa/src/build
    Build type: native build
    Program python found: YES (/opt/paraview-5.10.1/install/bin/python)
    Project name: mesa
    Project version: 21.2.1
    C compiler for the host machine: cc (gcc 11.2.0 “cc (Ubuntu 11.2.0-19ubuntu1) 11.2.0”)
    C linker for the host machine: cc ld.bfd 2.38
    C++ compiler for the host machine: c++ (gcc 11.2.0 “c++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0”)
    C++ linker for the host machine: c++ ld.bfd 2.38
    Host machine cpu family: x86_64
    Host machine cpu: x86_64
    Dependency clang (modules: clangBasic, clangCodeGen, clangDriver, clangFrontend, clangFrontendTool, clangHandleCXX, clangHandleLLVM) skipped: feature microsoft-clc disabled
    Program python3 found: YES (/opt/paraview-5.10.1/install/bin/python3)
    Fetching value of define “ETIME” : 62
    Checking for function “bswap32” : YES
    Checking for function “bswap64” : YES
    Checking for function “clz” : YES
    Checking for function “clzll” : YES
    Checking for function “ctz” : YES
    Checking for function “expect” : YES
    Checking for function “ffs” : YES
    Checking for function “ffsll” : YES
    Checking for function “popcount” : YES
    Checking for function “popcountll” : YES
    Checking for function “unreachable” : YES
    Checking for function “types_compatible_p” : YES
    Compiler for C supports function attribute const: YES
    Compiler for C supports function attribute flatten: YES
    Compiler for C supports function attribute malloc: YES
    Compiler for C supports function attribute pure: YES
    Compiler for C supports function attribute unused: YES
    Compiler for C supports function attribute warn_unused_result: YES
    Compiler for C supports function attribute weak: YES
    Compiler for C supports function attribute format: YES
    Compiler for C supports function attribute packed: YES
    Compiler for C supports function attribute returns_nonnull: YES
    Compiler for C supports function attribute alias: YES
    Compiler for C supports function attribute noreturn: YES
    Compiler for C supports function attribute visibility:hidden: YES
    Checking if “__uint128_t” : compiles: YES
    Compiler for C supports arguments -Werror=implicit-function-declaration: YES
    Compiler for C supports arguments -Werror=missing-prototypes: YES
    Compiler for C supports arguments -Werror=return-type: YES
    Compiler for C supports arguments -Werror=empty-body: YES
    Compiler for C supports arguments -Werror=incompatible-pointer-types: YES
    Compiler for C supports arguments -Werror=int-conversion: YES
    Compiler for C supports arguments -Wimplicit-fallthrough: YES
    Compiler for C supports arguments -Werror=thread-safety: NO
    Compiler for C supports arguments -Wno-missing-field-initializers: YES
    Compiler for C supports arguments -Wno-format-truncation: YES
    Compiler for C supports arguments -fno-math-errno: YES
    Compiler for C supports arguments -fno-trapping-math: YES
    Compiler for C supports arguments -Qunused-arguments: NO
    Compiler for C supports arguments -fno-common: YES
    Compiler for C supports arguments -Werror=format: YES
    Compiler for C supports arguments -Wformat-security: YES
    Compiler for C++ supports arguments -Werror=return-type: YES
    Compiler for C++ supports arguments -Werror=empty-body: YES
    Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES
    Compiler for C++ supports arguments -Wno-missing-field-initializers: YES
    Compiler for C++ supports arguments -Wno-format-truncation: YES
    Compiler for C++ supports arguments -fno-math-errno: YES
    Compiler for C++ supports arguments -fno-trapping-math: YES
    Compiler for C++ supports arguments -Qunused-arguments: NO
    Compiler for C++ supports arguments -flifetime-dse=1: YES
    Compiler for C++ supports arguments -Werror=format: YES
    Compiler for C++ supports arguments -Wformat-security: YES
    Compiler for C supports arguments -Wno-override-init: YES
    Compiler for C supports arguments -Wno-initializer-overrides: NO
    Compiler for C supports arguments -Werror=pointer-arith: YES
    Compiler for C++ supports arguments -Werror=pointer-arith: YES
    Compiler for C supports arguments -Werror=gnu-empty-initializer: NO
    Compiler for C++ supports arguments -Werror=gnu-empty-initializer: NO
    Compiler for C supports arguments -Wmicrosoft-enum-value: NO
    Checking if “GCC atomic builtins” : compiles: YES
    Checking if “GCC atomic builtins required -latomic” : links: YES
    Checking if “GCC 64bit atomics” with dependency not-found: links: YES
    Library ws2_32 found: NO
    Header <sys/sysmacros.h> has symbol “major” : YES
    Header <sys/sysmacros.h> has symbol “minor” : YES
    Header <sys/sysmacros.h> has symbol “makedev” : YES
    Header <sys/mkdev.h> has symbol “major” : NO
    Check usable header “sched.h” : YES
    Checking for function “sched_getaffinity” : YES
    Check usable header “xlocale.h” : NO
    Check usable header “linux/futex.h” : YES
    Check usable header “endian.h” : YES
    Check usable header “dlfcn.h” : YES
    Check usable header “execinfo.h” : YES
    Check usable header “sys/shm.h” : YES
    Check usable header “cet.h” : YES
    Check usable header “pthread_np.h” : NO
    Checking for function “strtof” : YES
    Checking for function “mkostemp” : YES
    Checking for function “timespec_get” : YES
    Checking for function “memfd_create” : YES
    Checking for function “random_r” : YES
    Checking for function “flock” : YES
    Checking for function “strtok_r” : YES
    Checking for function “getrandom” : YES
    Checking for function “qsort_r” : YES
    Checking for function “qsort_s” : NO
    Header <errno.h> has symbol “program_invocation_name” : YES
    Checking for function “posix_memalign” : YES
    Checking whether type “struct dirent” has member “d_type” : YES
    Checking if “strtod has locale support” : links: YES
    Checking if “Bsymbolic” : links: YES
    Checking if “gc-sections” : links: YES
    Checking if “version-script” : links: YES
    Checking if “dynamic-list” : links: YES
    Compiler for C supports link arguments -Wl,–build-id=sha1: YES
    Checking for function “dlopen” : YES
    Checking for function “dladdr” with dependency not-found: YES
    Checking for function “dl_iterate_phdr” : YES
    Checking for function “clock_gettime” : YES
    Found pkg-config: /usr/bin/pkg-config (0.29.2)
    Run-time dependency zlib found: YES 1.2.11
    Found CMake: /usr/bin/cmake (3.22.1)
    Run-time dependency libzstd found: NO (tried pkgconfig and cmake)
    Run-time dependency threads found: YES
    Checking for function “pthread_setaffinity_np” with dependency threads: YES
    Run-time dependency expat found: YES 2.4.1
    Library m found: YES
    Run-time dependency libdrm found: NO (tried pkgconfig and cmake)
    WARNING: Ignoring LLVM CMake dependency because dynamic was requested
    llvm-config found: YES (/opt/paraview-5.10.1/install/bin/llvm-config) 7.0.0
    Run-time dependency LLVM (modules: bitwriter, core, engine, executionengine, instcombine, mcdisassembler, mcjit, native, scalaropts, transformutils, coroutines) found: YES 7.0.0
    Run-time dependency valgrind found: NO (tried pkgconfig)
    Program bison found: YES (/usr/bin/bison)
    Program bison found: YES 3.8.2 (/usr/bin/bison)
    Program flex found: YES (/usr/bin/flex)
    Run-time dependency libunwind found: NO (tried pkgconfig and cmake)
    Run-time dependency OpenMP found: YES 4.5
    Run-time dependency x11 found: NO (tried pkgconfig and cmake)

meson.build:1952:4: ERROR: Dependency “x11” not found, tried pkgconfig and cmake

A full log can be found at /opt/paraview-5.10.1/superbuild/mesa/src/build/meson-logs/meson-log.txt
CMake Error at /opt/paraview-5.10.1/superbuild/sb-mesa-configure.cmake:47 (message):
Failed with exit code 1

make[2]: *** [superbuild/CMakeFiles/mesa.dir/build.make:99: superbuild/mesa/stamp/mesa-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:8674: superbuild/CMakeFiles/mesa.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
(base) rameshkolluru@lichfield:/opt/paraview-5.10.1$

This looks like a configuration/build log.

Please state exactly what are you trying to do with ParaView.

I was trying to install paraview from the binaries as told … I had downloaded the tar file extracted it and when I was installing it with make that error popped out.

Binaries do not need to be built. please do the following.

I tried this and then tried using the procedure explained … paraview worked but if I have to run a python script using pvpython it again returns the same module not found error

(base) rameshkolluru@lichfield:~/Downloads/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin$ pvpython
hwloc/linux: Ignoring PCI device with non-16bit domain.
Pass --enable-32bits-pci-domain to configure to support such devices
(warning: it would break the library ABI, don't enable unless really needed).
hwloc/linux: Ignoring PCI device with non-16bit domain.
Pass --enable-32bits-pci-domain to configure to support such devices
(warning: it would break the library ABI, don't enable unless really needed).
Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from paraview.simple import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'paraview'
>>>

./pvpython instead of pvpython, you are using your local install.

Thank you it worked … how would I make these default, should I use alias in bashrc or is there anyother way … could you please help me

Regards

  1. Remove your local installation of paraview (and report an issue to popos ?)
  2. Put the folder in /opt/
  3. Add /opt/ParaView…/bin to your PATH