Issue Importing Dask?

Hi all! This is my first post here but here but I’ve been using Dask for a few months. The issue I’m having seems to be related to importing the Dask library into my python script. The weirdest thing is that I did not update any packages and tried to use my script as normal but it seems like I cannot get past import dask.dataframe as dd step. Full error pasted below! I also noticed that it doesn’t seem affected across devices…

import dask.dataframe as dd
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\dataframe_init_.py”, line 6, in
from dask.dataframe import backends, dispatch, rolling
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\dataframe\backends.py”, line 15, in
from dask.dataframe.core import DataFrame, Index, Scalar, Series, _Frame
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\dataframe\core.py”, line 36, in
from dask.dataframe import methods
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\dataframe\methods.py”, line 33, in
from dask.dataframe.utils import is_dataframe_like, is_index_like, is_series_like
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\dataframe\utils.py”, line 20, in
from dask.dataframe import ( # noqa: F401 register pandas extension types
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages
ask\dataframe_dtypes.py”, line 9, in
from dask.dataframe.extensions import make_array_nonempty, make_scalar
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\d
sk\dataframe\extensions.py”, line 8, in
from dask.dataframe.accessor import (
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\dataframe\accessor.py”, line 126, in
class DatetimeAccessor(Accessor):
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\dataframe\accessor.py”, line 81, in init_subclass
_bind_property(cls, pd_cls, attr, min_version)
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\dataframe\accessor.py”, line 35, in _bind_property
setattr(cls, attr, property(derived_from(pd_cls, version=min_version)(func)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\utils.py”, line 856, in wrapper
method.doc = _derived_from(
^^^^^^^^^^^^^^
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\utils.py”, line 809, in _derived_from
method_args = get_named_args(method)
^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\IRios\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\dask\utils.py”, line 570, in get_named_args
s = inspect.signature(func)
^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\inspect.py”, line 3263, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\inspect.py”, line 3011, in from_callable
return _signature_from_callable(obj, sigcls=cls,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\inspect.py”, line 2599, in _signature_from_callable
call = _descriptor_get(call, obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\inspect.py”, line 2432, in _descriptor_get
return get(descriptor, obj, type(obj))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: descriptor ‘call’ for ‘type’ objects doesn’t apply to a ‘property’ object

Hi @IzzyFunk, welcome to Dask community!

So if I understand correctly, your Python environment stopped working without anything modified on your part?

What are you versions of Dask, Pandas, Numpy, maybe dask-expr?

Did you try building a new envionrment?

What is you installation method? Pip, Conda? Do you use a virtual environment?

Yes that is correct. My python environment stopped working without any changes from my end.

I use a virtual environment and install my packages using pip. Building a new environment shows the same error.

See below for package versions.

asammdf==7.2.0
attrs==23.2.0
canmatrix==1.0
click==8.1.7
cloudpickle==3.0.0
colorama==0.4.6
dask==2023.10.1
fsspec==2024.3.1
future==1.0.0
importlib_metadata==7.1.0
isal==1.6.1
locket==1.0.0
lxml==5.2.1
lz4==4.3.3
numexpr==2.10.0
numpy==1.26.4
packaging==24.0
pandas==2.2.1
partd==1.4.1
PySimpleGUI==4.60.5
python-dateutil==2.9.0.post0
pytz==2024.1
PyYAML==6.0.1
six==1.16.0
toolz==0.12.1
typing_extensions==4.11.0
tzdata==2024.1
zipp==3.18.1

What is your Python version?

It seems there is a bug with the recent 3.11.9 release: Fix ``dask.dataframe`` import error for Python 3.11.9 by rjzamora · Pull Request #11035 · dask/dask · GitHub.

Maybe your OS has updated Python and so your virtual environment is not working anymore.