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

3
  • 2
    Please never post a screenshot to a code. Try to write code with proper formatting. Thanks. Commented May 21, 2022 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. Commented May 21, 2022 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! Commented May 21, 2022 at 23:50

1 Answer 1

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)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.