Parallel Python
Home arrow Python Forums arrow Parallel Python Forum arrow PP on Ubuntu (the sys.path problem)
Parallel Python Community Forums rss  
October 25, 2014, 06:21:55 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Parallel python forum is up and running!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: PP on Ubuntu (the sys.path problem)  (Read 3844 times)
0 Members and 1 Guest are viewing this topic.
GuiltyBystander
New Python
*

Karma: 0
Posts: 1


View Profile
« on: January 16, 2012, 11:36:23 AM »

Hi all

I'm using PP 1.6 with Python 2.7 and NumPy 1.5.1 on Ubuntu. As has come up before in these threads, PP causes an exception when it tries to use NumPy, specifically when it needs shared objects such as multiarray.so, reason being that it is searching for them in /usr/share/pyshared/numpy/... rather than /usr/lib/pyshared/numpy...

My understanding was that this was because ppworker.py appends the current directory to sys.path in its main processing. I deleted the line which does this in ppworker.py and deleted ppworker.pyc in the /usr/lib/pymodules/python2.7 directory and reran to no avail: Python still searches /usr/share/pyshared/numpy/... for shared objects. (A new .pyc has been compiled from the amended code with today's timestamp.)

The architecture of PP seems no different to me than any other Python library packages for Ubuntu, with:
/usr/share/pyshared/ containing the .py files;
/usr/lib/pyshared/python2.7/ containing the .so files;
/usr/lib/pymodules/python2.7/ containing symbolic links to those two and the .pyc files.

So what is happening in PP that doesn't happen in any other use of NumPy on an Ubuntu platform? And more to the point is there another change I can make to the source code to get around this?

Many thanks in advance...

GB

===========================================
Exception capture:
===========================================
A fatal error has occured during the function execution
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ppworker.py", line 93, in run
    __args = pickle.loads(__sargs)
  File "/usr/share/pyshared/numpy/__init__.py", line 136, in <module>
    import add_newdocs
  File "/usr/share/pyshared/numpy/add_newdocs.py", line 9, in <module>
    from numpy.lib import add_newdoc
  File "/usr/share/pyshared/numpy/lib/__init__.py", line 4, in <module>
    from type_check import *
  File "/usr/share/pyshared/numpy/lib/type_check.py", line 8, in
<module>
    import numpy.core.numeric as _nx
  File "/usr/share/pyshared/numpy/core/__init__.py", line 5, in <module>
    import multiarray
ImportError: No module named multiarray
Logged
Vitalii
Global Moderator
Parallel Python
*****

Karma: 2
Posts: 518


View Profile WWW
« Reply #1 on: June 02, 2012, 10:31:33 PM »

you need to pass "multiarray" as one of imported modules in submit call.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Nutrition facts and analysis