[Paraview] Numpy import error
Sohail Shafii
ssshafii at ucdavis.edu
Fri Mar 22 02:01:06 EDT 2013
*works since I had to change PYTHON_LIBRARY to point to the "lib"
subdirectory of "/Library/Frameworks/Python.framework/Versions/2.7/,"
similar to the executable and include_dir versions
On Thu, Mar 21, 2013 at 10:59 PM, Sohail Shafii <ssshafii at ucdavis.edu>wrote:
> 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.ayachit at 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 <ssshafii at 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
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130321/87c9e3e0/attachment.htm>
More information about the ParaView
mailing list