Importing numpy into python works. Same with import sys.path.

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.

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.

I recompiled and it works now. Thanks.


On Thu, Mar 21, 2013 at 5:59 PM, Utkarsh Ayachit <
utkarsh.ayac...@kitware.com> wrote:

> Run "python" from terminal and import numpy. Does that work? If so,
> import sys and print sys.path. Now try the same in Python shell from
> ParaView. Does that work? If not, compare the sys.path from python and
> ParaView's Python shell. Any differences?
>
> On Thu, Mar 21, 2013 at 8:53 PM, Sohail Shafii <sssha...@ucdavis.edu>
> wrote:
> > Hi,
> >
> > I have numpy installed installed on Python 2.7.3. for Mac OS 10.8.3. I
> > compiled against the same python while building ParaView 3.98.1 64-bit,
> but
> > when I create a Python programmable filter in ParaView, I cannot import
> > numpy -- I get a message that says "ImportError: No module named numpy."
> > Python was enabled during compilation as well.
> >
> > Any advice?
> >
> > Thanks, Sohail
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview
> >
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to