Forums

Can't import dask.dataframe

Hi, I'm trying to import the dataframe module from dask and am getting the below error when it tries to run psutil:

Traceback (most recent call last):
  File "/home/nadocollin/poker/build_model.py", line 2, in <module>
    import dask.dataframe as dd
  File "/home/nadocollin/.local/lib/python3.7/site-packages/dask/dataframe/__init__.py", line 13, in <module>
    from .io import (
  File "/home/nadocollin/.local/lib/python3.7/site-packages/dask/dataframe/io/__init__.py", line 13, in <module>
    from .csv import read_csv, to_csv, read_table, read_fwf
  File "/home/nadocollin/.local/lib/python3.7/site-packages/dask/dataframe/io/csv.py", line 312, in <module>
    TOTAL_MEM = psutil.virtual_memory().total
  File "/usr/lib/python3.7/site-packages/psutil/__init__.py", line 1934, in virtual_memory
    ret = _psplatform.virtual_memory()
  File "/usr/lib/python3.7/site-packages/psutil/_pslinux.py", line 388, in virtual_memory
    with open_binary('%s/meminfo' % get_procfs_path()) as f:
  File "/usr/lib/python3.7/site-packages/psutil/_pslinux.py", line 187, in open_binary
    return open(fname, "rb", **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '/proc/meminfo'

There's reference on these forums to a new virtualization system that seemed like it could possibly help with this issue. If you think that might help, can you switch me over? Thank you.

We can do it, but your account is also on the old system image. We can upgrade both, but it may require re-creation of the virtual environments as the python versions will be upgraded.

That's fine, no big deal. Thank you!

It's not clear from your post whether you're saying if you want the switch or not.

Please switch my account over. Thanks.

Please switch my account over. Thanks.

No problem -- that's done now. Any new consoles you start will have the new virtualization system and system image; any scheduled/always-on tasks and websites will pick it up the next time they're (re)started.

Hi there! I am having the same problem when calling "import dask.dataframe as dd". Can you kindly advise on the solution? From this post it's not really clear what to do. A new virtualization system is mentioned but it's not described how to do the switch (I am also wondering why that's not the default since I have opned the account 2 weeks ago).

Thanks in advance!!

@ZRiskEngine It's done for you

I'm facing the same issue. Please help. Not able to import dask.dataframe as dd

What error do you get?

console. jupyter notebook

You will not be able to use dask in a notebook. It will work in a console and in tasks, though.