Parallel Python
Home arrow Python Forums arrow Parallel Python Forum arrow PP on Ubuntu (the sys.path problem)
Is your Python knowledge up to date? Shop for Python books on Amazon.
Parallel Python Community Forums rss  
November 26, 2015, 04:55:44 PM *
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]
Author Topic: PP on Ubuntu (the sys.path problem)  (Read 4926 times)
0 Members and 1 Guest are viewing this topic.
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, 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 appends the current directory to sys.path in its main processing. I deleted the line which does this in 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...


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

Karma: 2
Posts: 520

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.

Pages: [1]
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