ModuleNotFoundError: No module named 'dask.dataframe'; 'dask' is not a package

Viewed 2461

For a current project, I am planning to merge two very large CSV files with Dask as an alternative to Pandas. I have installed Dask thorough pip install "dask[dataframe]".

When running import dask.dataframe as dd, I am however receiving the feedback ModuleNotFoundError: No module named 'dask.dataframe'; 'dask' is not a package.

Several users seem to have had the same problem and were recommneded to install the module via Conda, which has not helped either in my case.

What is the reason for the module not being found?

1 Answers

As user John Gordon mentioned, the reason for the error notification is that a file within the same folder was named dask.py. Renaming the file solved the situation within seconds.

As a general rule/conclusion: is as advisable to not use .py file names that directly relate to Python modules.

Related