user3645323
user3645323

Reputation: 31

IPython parallel does not work for me in IPython 2.2 but did in 2.1

the skeleton code of what I do is

from IPython import parallel
.....
rcAll = parallel.Client()
all_engines = rcAll[:]
lbvAll = rcAll.load_balanced_view()
....
for anInpt in allInpt:
    lbvAll.apply(mputil.doAll, anInpt)
lbvAll.wait()
lbvAll.get_result()
....
for ijk in range(len(list(lbvAll.results.values()))):
    out = list(lbvAll.results.values())[ijk]
    ionS = out[0]

However, all that out ever contains is import error messages.
This worked before but but something must have changed between IPython 2.1 and 2.2. At least, that is my guess.

Upvotes: 0

Views: 30

Answers (2)

targetXING
targetXING

Reputation: 111

Check the output of:

cat /usr/local/lib/python2.7/dist-packages/*.pth

Delete the following path if it exits inside the "catted" folder:

/usr/lib/python2.7/dist-packages

usr/lib/python2.7/dist-packages being on the front of sys.path means that there is an easy-install.pth file with this path, which should be removed. It is caused by a bug in setuptools.

If that doesn't work, simply upgrading some of your tools might fix the problem.

pip install --upgrade ipython
pip install --upgrade setuptools pip

Upvotes: 1

user3645323
user3645323

Reputation: 31

I found the problem. I started the ipcluster in a shell with a different PYTHONPATH than the one I was running the notebook in. That simple but I took a while. I apologize for the noise.

Upvotes: 0

Related Questions