0

On import modin.pandas as modin_pd line I get ModuleNotFoundError: No module named 'modin'. I am using poetry & JupyterLab. If in the cell I type !poetry add modin, I get ValueError saying Package modin is already present.

So it cannot install modin because it is already installed but it cannot import it either. Any obvious solution that I am missing?

pip freeze command also shows modin to be installed. I also tried to install it via pip install but absolutely nothing let me to import this module in the end.

Valeria
  • 1,508
  • 4
  • 20
  • 44
  • with `pip freeze --local` you can see only the packages in the local virtual env. Have you tried to remove the package with pip, or even better pip3, and then reinstall it? Also be sure to have python >= 3.5 because it's in the modin requirements – Y. Lucarelli Feb 27 '20 at 09:57
  • @Y.Lucarelli In the end after restarting container with JupyterLab and reinstalling poetry viertual environment, I got where I started yesterday: to `KeyError: 'CPU'` on `num_cpus = ray.global_state.cluster_resources()["CPU"]` which is called by `import modin.pandas as modin_pd`. – Valeria Feb 27 '20 at 10:19

1 Answers1

0

The problem may be this one KeyError: CPU

It can be solved by using pip install psutil

  • I have `psutil` installed. I looked in the logs and it seems `initialize_ray()` does not work correctly: it gives `ArrowIOError: Could not connect to socket /tmp/ray/session_2020-02-27_14-42-42_17463/sockets/plasma_store` error. – Valeria Feb 27 '20 at 13:43
  • as this issues stands out [cannot connect to socket](https://github.com/modin-project/modin/issues/468) it may be related to a limit of memory. It's not fixed yet, but the guy with this issue have found a way to avoid the error. Please check if his method also works for you – Y. Lucarelli Feb 27 '20 at 13:56