0

I am going through the tutorial to learn ipyparallel and while doing so, I got the error: AttributeError: module 'ipyparallel' has no attribute 'Cluster'

I uninstalled and reinstalled the package but the error persisted, does anyone have any tips for solving this issue?

My Code/ Issue:

code

Thanks

YaOzI
  • 16,128
  • 9
  • 76
  • 72
JR222
  • 1
  • 2
  • 2
    Please never post a screenshot to a code. Try to write code with proper formatting. Thanks. – Burhan May 21 '22 at 16:58
  • 1
    You may have an older version of ipyparallel and need to upgrade. If you read the documentation online, it says the `Cluster` API was added in version 7. – AlexK May 21 '22 at 18:03
  • Thank you for the tip, I will write and format the code in my future posts. And the issue was that I had an older version, thanks, it looks like when I installed ipyparallel with Conda it installed version 6. I appreciate the help! – JR222 May 21 '22 at 23:50

1 Answers1

1

Make sure your ipyparallel version is greater or equal to 7.0.

In [1]: import ipyparallel as ipp

In [2]: ipp.__version__
Out[2]: '6.3.0'

In [3]: hasattr(ipp, "Cluster")
Out[3]: False

Sometimes conda install ipyparallel may not install the newest version. Try using pip install ipyparallel. After version 7.0:

In [1]: import ipyparallel as ipp

In [2]: ipp.__version__
Out[2]: '8.4.1'

In [3]: hasattr(ipp, "Cluster")
Out[3]: True

In [4]: cluster = ipp.Cluster(n=4)
YaOzI
  • 16,128
  • 9
  • 76
  • 72