0

The python command

import dask

Results in a long error chain to one of its dependencies.

I can replicate deeper parts of this error chain by importing tlz.

import tlz
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\dask\__init__.py", line 1, in <module>
    from dask import config, datasets
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\dask\datasets.py", line 3, in <module>
    from dask.utils import import_required
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\dask\utils.py", line 25, in <module>
    import tlz as toolz
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\tlz\__init__.py", line 9, in <module>
    from . import _build_tlz
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\tlz\_build_tlz.py", line 3, in <module>
    import toolz
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\toolz\__init__.py", line 20, in <module>
    from . import curried, sandbox
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\toolz\curried\__init__.py", line 27, in <module>
    from . import operator
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\toolz\curried\operator.py", line 14, in <module>
    {name: curry(f) if should_curry(f) else f
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\toolz\curried\operator.py", line 14, in <dictcomp>
    {name: curry(f) if should_curry(f) else f
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\toolz\curried\operator.py", line 9, in should_curry
    num = num_required_args(f)
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\toolz\functoolz.py", line 866, in num_required_args
    sigspec, rv = _check_sigspec(sigspec, func, _sigs._num_required_args,
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\toolz\functoolz.py", line 827, in _check_sigspec
    sigspec = inspect.signature(func)
AttributeError: module 'inspect' has no attribute 'signature'

Any ideas on how to fix this issue?

Michael Delgado
  • 13,789
  • 3
  • 29
  • 54
Isaacnfairplay
  • 217
  • 2
  • 18
  • does installing the complete module help? `pip install -U dask[complete]` – ificiana Jul 07 '22 at 18:32
  • Same issue. I uninstalled dask, purged the pip cache, and installed with pip install -U dask[complete]. – Isaacnfairplay Jul 07 '22 at 20:47
  • flask imported without issue on my personal machine. The python version is 3.10.5 where the failure was on 3.10.4, but it is unlikely this issue is python version related. I will try in a clean venv on the older python version and update this thread. – Isaacnfairplay Jul 08 '22 at 02:35

1 Answers1

0

Fixed issue by removing an extra set of python installations on my computer.

Details here: Create venv without admin access python

The following command works as expected

import dask
help(dask)
Isaacnfairplay
  • 217
  • 2
  • 18