<div dir="ltr">Importing numpy into python works. Same with import sys.path.<div><br></div><div style>What's interesting is that ParaView uses python stored in /usr/local/ while the version of Python that I use (i.e. default python from the terminal) resides in /Library/Frameworks. The one in /usr/local does not have numpy.</div>
<div style><br></div><div style>I didn't think that ParaView was using the one in /urs/local, since it was using the python binaries (PYTHON_EXECUTABLE and PYTHON_INCLUDE_DIR) from the Frameworks directory according to ccmake. However, it was using the /usr/local version for the PYTHON_LIBRARY, which didn't catch my attention when I was browsing the ccmake configuration. So it was effectively using both for different tasks. Not surprising since my library path pointed to /usr/lib and my path had the Frameworks folder as the first item. </div>
<div style><br></div><div style>I recompiled and it works now. Thanks.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 21, 2013 at 5:59 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Run "python" from terminal and import numpy. Does that work? If so,<br>
import sys and print sys.path. Now try the same in Python shell from<br>
ParaView. Does that work? If not, compare the sys.path from python and<br>
ParaView's Python shell. Any differences?<br>
<div><div class="h5"><br>
On Thu, Mar 21, 2013 at 8:53 PM, Sohail Shafii <<a href="mailto:ssshafii@ucdavis.edu">ssshafii@ucdavis.edu</a>> wrote:<br>
> Hi,<br>
><br>
> I have numpy installed installed on Python 2.7.3. for Mac OS 10.8.3. I<br>
> compiled against the same python while building ParaView 3.98.1 64-bit, but<br>
> when I create a Python programmable filter in ParaView, I cannot import<br>
> numpy -- I get a message that says "ImportError: No module named numpy."<br>
> Python was enabled during compilation as well.<br>
><br>
> Any advice?<br>
><br>
> Thanks, Sohail<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
</blockquote></div><br></div>