# ParaView 5.7 doesn't work scipy internal python module

**URL:** https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267
**Category:** Development
**Tags:** python
**Created:** [January 6, 2020, 6:24am UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267 "2020-01-06T06:24:03Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![MBG](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/7ab992/32.png) [@MBG](https://discourse.paraview.org/u/MBG)
#### Post date: [January 6, 2020, 6:24am UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/1 "2020-01-06T06:24:03Z")

</div>

MacOS ParaView 5.6.2

```
>>> from scipy.spatial import cKDTree

>>>

```

MacOS ParaView 5.7

```
from scipy.spatial import cKDTree
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Applications/ParaView-5.7.0.app/Contents/Python/scipy/spatial/ __init__.py", line 100, in <module>
    from .qhull import *
ImportError: dlopen(/Applications/ParaView-5.7.0.app/Contents/Python/scipy/spatial/qhull.so, 2): Symbol not found: _main
  Referenced from: /Applications/ParaView-5.7.0.app/Contents/Python/scipy/spatial/qhull.so
  Expected in: flat namespace
 in /Applications/ParaView-5.7.0.app/Contents/Python/scipy/spatial/qhull.so

```

And I can’t load external scipy module because the internal one exists.

---

<div class="post-metadata">

### Author: ![MBG](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/7ab992/32.png) [@MBG](https://discourse.paraview.org/u/MBG)
#### Post date: [January 6, 2020, 6:52am UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/2 "2020-01-06T06:52:52Z")

</div>

The recent night build ParaView-5.7.0-936-ga45459775a.app:

```
from scipy.spatial import cKDTree
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Applications/ParaView-5.7.0-936-ga45459775a.app/Contents/Python/scipy/spatial/ __init__.py", line 100, in <module>
    from .qhull import *
ImportError: dlopen(/Applications/ParaView-5.7.0-936-ga45459775a.app/Contents/Python/scipy/spatial/qhull.so, 2): Symbol not found: _main
  Referenced from: /Applications/ParaView-5.7.0-936-ga45459775a.app/Contents/Python/scipy/spatial/qhull.so
  Expected in: flat namespace
 in /Applications/ParaView-5.7.0-936-ga45459775a.app/Contents/Python/scipy/spatial/qhull.so
```

---

<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: [January 6, 2020, 9:30am UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/3 "2020-01-06T09:30:40Z")

</div>

Are you using our release from [https://www.paraview.org/download/](https://www.paraview.org/download/)

Works fine on linux here.

---

<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: [January 6, 2020, 9:30am UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/4 "2020-01-06T09:30:59Z")

</div>

@cory.quammen

---

<div class="post-metadata">

### Author: ![MBG](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/7ab992/32.png) [@MBG](https://discourse.paraview.org/u/MBG)
#### Post date: [January 6, 2020, 10:07am UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/5 "2020-01-06T10:07:29Z")

</div>

MacOS is not equal to Linux. Try MacOS build by your link.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [January 6, 2020, 1:48pm UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/6 "2020-01-06T13:48:35Z")

</div>

I am able to run `from scipy.spatial import cKDTree` with the Kitware binaries of 5.7.0.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/6/63325855927058bcf0cf34733e6eeca7df346af8.png)

---

<div class="post-metadata">

### Author: ![MBG](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/7ab992/32.png) [@MBG](https://discourse.paraview.org/u/MBG)
#### Post date: [January 6, 2020, 2:03pm UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/7 "2020-01-06T14:03:43Z")

</div>

![Screenshot 2020-01-06 at 21.01.33](https://discourse.paraview.org/uploads/default/original/2X/6/661e8b0d3af4fd6c8d6ed39a33ce472820a8025b.png)

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [January 6, 2020, 2:51pm UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/8 "2020-01-06T14:51:40Z")

</div>

What version of macOS are you running? Since 5.7 uses the system Python, that could explain the difference. I am running macOS 10.14.6.

---

<div class="post-metadata">

### Author: ![MBG](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/7ab992/32.png) [@MBG](https://discourse.paraview.org/u/MBG)
#### Post date: [January 6, 2020, 2:56pm UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/9 "2020-01-06T14:56:07Z")

</div>

MacOS 10.14.6 (18G2022)

ParaView Python Library Path: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7

ParaView Python Library Version: 2.7.16 (default, Oct 16 2019, 00:34:56)  
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)]

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [January 6, 2020, 6:05pm UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/10 "2020-01-06T18:05:51Z")

</div>

Strange, I have the same Python version and Path on my system.

I don’t know why it is looking for a `main` function in `qhull.so` on your system but not mine.

Can you run

`/Applications/ParaView-5.7.0.app/Contents/MacOS/paraview -dr`

to try running with a default environment and settings?

---

<div class="post-metadata">

### Author: ![MBG](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/7ab992/32.png) [@MBG](https://discourse.paraview.org/u/MBG)
#### Post date: [January 6, 2020, 6:24pm UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/11 "2020-01-06T18:24:38Z")

</div>

I uninstalled and installed ParaView 5.7 again and the issue is the same and it’s not depends of PYTHONPATH env variable:

unset PYTHONPATH; /Applications/ParaView-5.7.0.app/Contents/MacOS/paraview -dr

```
from scipy.spatial import cKDTree

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Applications/ParaView-5.7.0.app/Contents/Python/scipy/spatial/ __init__.py", line 100, in <module>
    from .qhull import *
ImportError: dlopen(/Applications/ParaView-5.7.0.app/Contents/Python/scipy/spatial/qhull.so, 2): Symbol not found: _main
  Referenced from: /Applications/ParaView-5.7.0.app/Contents/Python/scipy/spatial/qhull.so
  Expected in: flat namespace
 in /Applications/ParaView-5.7.0.app/Contents/Python/scipy/spatial/qhull.so
```

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [January 6, 2020, 6:38pm UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/12 "2020-01-06T18:38:51Z")

</div>

Thanks for trying. Thoughts, @ben.boeckel?

---

<div class="post-metadata">

### Author: ![MBG](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/7ab992/32.png) [@MBG](https://discourse.paraview.org/u/MBG)
#### Post date: [January 13, 2020, 5:25pm UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/13 "2020-01-13T17:25:24Z")

</div>

Maybe the issue is not so important if we will have soon ParaView 5.8 with Python 3:

> [@ParaView w/ Python 3 on Mac - when?](https://discourse.paraview.org/t/paraview-w-python-3-on-mac-when/3083/10):
>
> pvpython is just python with the correct PYTHONPATH and LD\_LIBRARY\_PATH passed in. Using a separate executable spares the user of knowing where the python modules and libraries are in the ParaView install or build hierarchy. There is another more subtle differences because python has all functionality built in while pvpython accesses the python functionality through dynamic libraries but it would work the same most of the time.

---

<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: [January 14, 2020, 3:26pm UTC](https://discourse.paraview.org/t/paraview-5-7-doesnt-work-scipy-internal-python-module/3267/14 "2020-01-14T15:26:20Z")

</div>

Very strange. I don’t know what would cause it to happen on one machine and not another, sorry. Looking for `main` is very odd (macOS mangling involves putting a leading `_` on symbols).
