# Build paraview with python 3.7.3 but ModuleNotFoundError: No module named ‘vtkmodules.vtkCommonCorePython’

**URL:** https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928
**Category:** ParaView Support
**Created:** [May 26, 2019, 1:15pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928 "2019-05-26T13:15:18Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 26, 2019, 1:15pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/1 "2019-05-26T13:15:18Z")

</div>

Dear Experts,  
After i build the latest paraview with python 3.7.3, when i open “Python Shell” window it pop error message:

```
"
    Error: Could not import vtkCommonComputationalGeometry
    .....
    bin/Lib/site-packages\vtkmodules\vtkCommonCore.py", line 2, in <module>
    from .vtkCommonCorePython import *
    ModuleNotFoundError: No module named 'vtkmodules.vtkCommonCorePython'
"

```

I can find a file vtkCommonCorePython.pyd under the same directory with vtkCommonCore.py, but dont know how to solve this issue, seems it make python cannot work.

Another issues is about build **debug** version, my first try found one project need python37\_d.lib, However after i install python37\_d.lib, all projects link to python37\_d.lib, but some project still require to link to python37\_d.lib, like building project “WrappingPythonCore”, it said `"LINK : fatal error LNK1104: cannot open file 'python37.lib' ", this really make me confused...`

Could you please help me out?

Thanks and Best Regards,  
Sharon

```auto
This issue is caused because i take paraview as a sub directory in my project
When I build paraview alone with python, there is no such issue, can it works OK
```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 28, 2019, 7:54am UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/2 "2019-05-28T07:54:52Z")

</div>

Which version of ParaView? Which OS? Can you share you cmake configuration?

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 28, 2019, 8:42am UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/3 "2019-05-28T08:42:25Z")

</div>

paraview is git clone from GitHub  
OS is window 10.0  
Python version is 3.7.3 stable release

I add “-DPARAVIEW\_ENABLE\_PYTHON=ON” in cmake config command line and then build a debug version of paraview

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 28, 2019, 9:06am UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/4 "2019-05-28T09:06:04Z")

</div>

Are you using mvscc compiler ?  
Are you building with ninja or visual studio ?

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 28, 2019, 12:46pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/5 "2019-05-28T12:46:36Z")

</div>

Hi Mathieu,  
I use visual studio 2015 to build, qt is Qt5.10.1

Regards,  
Sharon

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 28, 2019, 12:48pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/6 "2019-05-28T12:48:42Z")

</div>

Please build with ninja+mvscc.

See here : [https://gitlab.kitware.com/paraview/paraview/blob/nightly-master/Documentation/dev/build.md](https://gitlab.kitware.com/paraview/paraview/blob/nightly-master/Documentation/dev/build.md)

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 28, 2019, 12:52pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/7 "2019-05-28T12:52:33Z")

</div>

It is impossible to build a successful one with VisualStudio?  
What’s the difference between these build methods?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 28, 2019, 12:56pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/8 "2019-05-28T12:56:30Z")

</div>

Building with visual studio is not tested.  
Ninja is much faster anyway.  
Nothing prevent you from working in visual studio and building with ninja though.

I do not use nor know much about visual studio, so I can’t answer your questions.

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 28, 2019, 12:58pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/9 "2019-05-28T12:58:20Z")

</div>

Hi Mathieu,  
Thank you for your kind help and reply!  
I will have a try

Best Regards,  
Sharon

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [May 28, 2019, 1:36pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/10 "2019-05-28T13:36:00Z")

</div>

> Building with visual studio is not tested.

It’s not actively tested due to its slow speed, but it should work.

> Another issues is about build **debug** version, my first try found one project need python37\_d.lib, However after i install python37\_d.lib, all projects link to python37\_d.lib, but some project still require to link to python37\_d.lib, like building project “WrappingPythonCore”, it said `"LINK : fatal error LNK1104: cannot open file 'python37.lib' ", this really make me confused...`

Building VTK in Debug mode and using Debug Python are two different things. What are you trying to do?

> After i build the latest paraview with python 3.7.3, when i open “Python Shell” window it pop error message:

Python’s errors are really bad here. It found it, but failed to load it, usually because its dependencies (the other VTK libraries) are not in `$PATH`.

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 28, 2019, 1:43pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/11 "2019-05-28T13:43:15Z")

</div>

Hi Ben,  
Thank you for your reply!  
I build paraview in debug, I dont want to use Debug Python.  
I also need build paraview in release.

For python, i just want it can work, no matter debug or release.

In my situation, there is a file vtkCommonCorePython.pyd under the same directory with vtkCommonCore.py, but i dont know why it not work…

Best Regards,  
Sharon

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [May 28, 2019, 3:03pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/12 "2019-05-28T15:03:02Z")

</div>

Then things are probably OK on the Python side. The loading is likely failing due to DLL load errors. Does it work if you add `/path/to/paraview/.dll/files` to the `PATH` environment variable?

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 29, 2019, 1:02pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/13 "2019-05-29T13:02:52Z")

</div>

Hi Ben,  
I found if i build paraview alone, it is OK.  
However in my situation, paraview is a sub-directory, i wrote a cmake file to add paraview folder when build.  
This caused this error, but i dont know how to solve this issue…

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [May 29, 2019, 3:47pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/14 "2019-05-29T15:47:06Z")

</div>

Oh, you do `add_subdirectory(ParaView)`? I’d recommend building ParaView on its own and then doing `find_package(ParaView)` to build against it. ParaView’s CMake code probably has numerous places where it assumes that it is the top-level project being built.

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 30, 2019, 11:53am UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/15 "2019-05-30T11:53:54Z")

</div>

Hi Ben,  
Yes, I do 'add\_subdirectory(ParaView)`, all the DLLs are builded correctly, only python is wrong

You are right, seems build paraview alone with python, there is no such issue.  
This is caused by taking paraview as a sub directory.  
Thank you for your suggestion, in fact i prefer to build paraview and my plugins together, however, if I cannot solve this issue, I may have to take your suggestion to first build paraview, then use find\_package…

Thank you for your kind help!  
Best Regards,  
Sharon

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 30, 2019, 11:57am UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/16 "2019-05-30T11:57:07Z")

</div>

This issue is caused because i take paraview as a sub directory in my project  
When I build paraview alone with python, there is no such issue, can it works OK

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [May 30, 2019, 12:46pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/17 "2019-05-30T12:46:16Z")

</div>

> Thank you for your suggestion, in fact i prefer to build paraview and my plugins together, however, if I cannot solve this issue, I may have to take your suggestion to first build paraview, then use find\_package…

You can place the plugin under the `Plugins/` directory of ParaView and it will be picked up automatically by ParaView. This is more of a one-off solution though. On `master`, ParaView is now capable of making an SDK on all platforms, so using an installed ParaView is the suggested way to do it today.

The core problem is caused by the required `dll` files not being in `PATH` when loading the Python modules. `pvpython` lives next to them and that just works, but when using an external Python, extra help is required to get them to be found on Windows.

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 30, 2019, 1:06pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/18 "2019-05-30T13:06:01Z")

</div>

Thank you Ben for your help!  
Since I don’t want to change anything inside paraview, so we take it outside of paraview…

i will try the second option first.

Thanks and Best Regards,  
Sharon

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [May 30, 2019, 6:19pm UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/19 "2019-05-30T18:19:51Z")

</div>

There is plugin documentation here if you need it: [https://kitware.github.io/paraview-docs/nightly/cxx/PluginHowto.html](https://kitware.github.io/paraview-docs/nightly/cxx/PluginHowto.html) It lacks information on prepping them for distribution, but feedback on what information would be useful would help us focus on what parts need improvement.

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [May 31, 2019, 4:29am UTC](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928/20 "2019-05-31T04:29:29Z")

</div>

Thank you Ben!  
Much appreciate it!  
Best Regards,  
Sharon

[Next page](https://discourse.paraview.org/t/build-paraview-with-python-3-7-3-but-modulenotfounderror-no-module-named-vtkmodules-vtkcommoncorepython/1928.md?page=2)
