[Paraview] installing additional Python modules

Heiland, Randy heiland at iu.edu
Mon Dec 18 06:19:16 EST 2017


Only heard crickets on this one :-)

I’ve spent some time looking into this and here’s some of what I've discovered so far (I was jumping between OSX and Win10):

1) Stay away from trying to mix Anaconda/conda Python distribution with any other Python distro (including PV’s) [1]

2) Use/install a Python from python.org<http://python.org> that has ‘pip’ installed (e.g. 2.7.14) and then run:
$ python -m pip install scipy

Note, attempting this with pvpython doesn’t work:
$ pvpython -m pip install scipy
Got unknown argument: -m

3) Ensure pvpython’s sys.path points to *all* relevant dirs containing all necessary scipy-related dependencies in the above installation. Hopefully it gets picked up automatically if it’s a default system install. Alternatively, I *think* I was able to manually copy the scipy and numpy folders from the system install into the appropriate PV Python folder (on Windows anyway).

4) This all feels very fragile.

5) I briefly tinkered with conda-forge and building PV from source, then backed out.

6) About the time I figure out a reasonably good solution, a new version of PV supporting Python3 and pip will come out making life wonderfully simple…

Comments very much welcome.

-Randy


[1] https://groups.google.com/a/continuum.io/forum/#!topic/conda/ozG_nTuQQYk


On Dec 12, 2017, at 10:37 PM, Heiland, Randy <heiland at iu.edu<mailto:heiland at iu.edu>> wrote:

Any good advice for installing additional 3rd party modules for pvpython?  In a Programmable Source I’d written to read in MATLAB (.mat) data files, I was using the scipy module (scipy.io.loadmat). When I wrote that, I naively thought to myself - WOW, it sure was convenient that they included scipy as a 3rd party pkg in pvpython! Turns out, I was of course picking it up from another Python 2.7 distro. I only discovered this while testing on another OS (without any Python).

So, have others found themselves in a similar situation? I realize the hurdle depends on the module itself and, in this case, scipy is not trivial. Right now, I’m thinking maybe requesting that users install Miniconda 2.7 and grow from there, which presumably pvpython could use. Thoughts?

-Randy
_______________________________________________
Powered by www.kitware.com<http://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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://paraview.org/pipermail/paraview/attachments/20171218/2f21d01a/attachment.html>


More information about the ParaView mailing list