Repository: modin-project/modin

Issue:
Unable to load modin.pandas with Dask 2.10.0
<!--
General questions should be asked on the mailing list modin-dev@googlegroups.com.

Before submitting an issue, please fill out the following form.
-->

### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**:
macOS, 10.14.6
- **Modin installed from (source or binary)**:
binary, 2.10.0
- **Modin version**:
0.7.0
- **Python version**:
3.6
- **Exact command to reproduce**:
import modin.pandas as pd
<!--
You can obtain the Modin version with

python -c "import modin; print(modin.__version__)"
-->

### Describe the problem
<!-- Describe the problem clearly here. -->

>>> import modin.pandas as pd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/modin/__init__.py", line 69, in <module>
    __execution_engine__ = get_execution_engine()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/modin/__init__.py", line 58, in get_execution_engine
    "Please `pip install modin[dask]` to install compatible Dask version."
ImportError: Please `pip install modin[dask]` to install compatible Dask version.

I opened up the `__init__.py` file, in line 55: 
`or str(distributed.__version__) < "2.3.2"`, this returns **True**  even when `distributed.__version__ ==2.10.0`


### Source code / logs
<!-- Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem. -->



Discussion:
Hi @rewreu thanks for posting!

This is a bug. I will get this fixed, but in the meantime, the workaround is as follows:

```python
import os
os.environ["MODIN_ENGINE"] = "dask"
import modin.pandas as pd
```

This will ignore the checks for version.

Resolving patch:
diff --git a/modin/__init__.py b/modin/__init__.py
--- a/modin/__init__.py
+++ b/modin/__init__.py
@@ -1,6 +1,7 @@
 import os
 import sys
 import warnings
+from packaging import version
 
 from ._version import get_versions
 
@@ -34,7 +35,7 @@ def get_execution_engine():
                 except ImportError:
                     pass
                 else:
-                    if ray.__version__ != "0.8.0":
+                    if version.parse(ray.__version__) != version.parse("0.8.0"):
                         raise ImportError(
                             "Please `pip install modin[ray]` to install compatible Ray version."
                         )
@@ -50,10 +51,9 @@ def get_execution_engine():
                     )
                 )
             else:
-                if (
-                    str(dask.__version__) < "2.1.0"
-                    or str(distributed.__version__) < "2.3.2"
-                ):
+                if version.parse(dask.__version__) < version.parse(
+                    "2.1.0"
+                ) or version.parse(distributed.__version__) < version.parse("2.3.2"):
                     raise ImportError(
                         "Please `pip install modin[dask]` to install compatible Dask version."
                     )
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@
     url="https://github.com/modin-project/modin",
     long_description=long_description,
     long_description_content_type="text/markdown",
-    install_requires=["pandas==0.25.3"],
+    install_requires=["pandas==0.25.3", "packaging"],
     extras_require={
         # can be installed by pip install modin[dask]
         "dask": dask_deps,


Test patch: