I'm a rookie using Dask and I installed the new version 2.12.0 on my MacBook MacOS High Sierra 10.13.6. When I try to start the distributed mode with the code below:
from dask.distributed import Client
c = Client()
I got the following error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-67101dbde0b6> in <module>()
1 from dask.distributed import Client
----> 2 c = Client()
~/anaconda3/lib/python3.6/site-packages/distributed/client.py in __init__(self, address, loop, timeout, set_as_default, scheduler_file, security, asynchronous, name, heartbeat_interval, **kwargs)
554 if set_as_default:
555 self._previous_get = _globals.get('get')
--> 556 dask.set_options(get=self.get)
557 self._previous_shuffle = _globals.get('shuffle')
558 dask.set_options(shuffle='tasks')
AttributeError: module 'dask' has no attribute 'set_options'
Also, if I instantiate the c = Client(set_as_default=False) the cluster seems to successfully raise because I get the connection information for the dashboard (see this image). But as I navigate through the dashboard the following error is triggered.
According to the documentation lifting a single machine cluster seems to be trivial but I don't know what could be wrong. I would be very grateful if someone could guide me on how to solve this incident ;)
Your source file is named dask.py, which introduces a naming conflict between your module, dask.py, and the dask package, with your module taking precedence in later import statements. Therefore, when distributed/client.py attempts to call dask.set_options, this fails with AttributeError as your module does not provide this function.
After running this dask.py module, python caches the compiled python code. Therefore, even when you renamed your module to something else, the import name conflict still exists. To resolve this, you should delete the __pycache__ directory after which you should find that your module executes successfully.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With