alibaba / GraphScope

🔨 🍇 💻 🚀 GraphScope: A One-Stop Large-Scale Graph Computing System from Alibaba | 一站式图计算系统
https://graphscope.io
Apache License 2.0
3.24k stars 438 forks source link

[BUG] No module named 'packaging' error when create session on local type #487

Closed acezen closed 3 years ago

acezen commented 3 years ago

To Reproduce

cd coordinator
python3 setup.py bdist_wheel
python3 install dist/*.wheel
import graphscope
graphscope.set_option(show_log=True)
s = graphscope.session(cluster_type="hosts")

2021-07-07 11:31:43,982 [INFO][session:581]: Initializing graphscope session with parameters: {'addr': None, 'mode': 'eager', 'cluster_type': 'hosts', 'num_workers': 2, 'preemptive': True, 'k8s_namespace': None, 'k8s_service_type': 'NodePort', 'k8s_gs_image': 'registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:0.5.0', 'k8s_etcd_image': 'quay.io/coreos/etcd:v3.4.13', 'k8s_image_pull_policy': 'IfNotPresent', 'k8s_image_pull_secrets': [], 'k8s_gie_graph_manager_image': 'registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:0.5.0', 'k8s_zookeeper_image': 'zookeeper:3.4.14', 'k8s_coordinator_cpu': 0.5, 'k8s_coordinator_mem': '512Mi', 'k8s_etcd_num_pods': 1, 'k8s_etcd_cpu': 1.0, 'k8s_etcd_mem': '512Mi', 'k8s_zookeeper_cpu': 0.2, 'k8s_zookeeper_mem': '512Mi', 'k8s_gie_graph_manager_cpu': 0.2, 'k8s_gie_graph_manager_mem': '512Mi', 'k8s_vineyard_daemonset': 'none', 'k8s_vineyard_cpu': 0.2, 'k8s_vineyard_mem': '512Mi', 'vineyard_shared_mem': '4Gi', 'k8s_engine_cpu': 0.2, 'k8s_engine_mem': '1Gi', 'k8s_mars_worker_cpu': 0.2, 'k8s_mars_worker_mem': '512Mi', 'k8s_mars_scheduler_cpu': 0.2, 'k8s_mars_scheduler_mem': '512Mi', 'with_mars': False, 'k8s_volumes': {}, 'k8s_waiting_for_delete': False, 'timeout_seconds': 600, 'dangling_timeout_seconds': 600, 'hosts': ['localhost'], 'port': None, 'vineyard_socket': '', 'k8s_client_config': {}}
2021-07-07 11:31:43,984 [INFO][cluster:109]: Initializing coordinator.
2021-07-07 11:31:43,989 [INFO][cluster:142]: Coordinator service started successful, connecting to service...
Traceback (most recent call last):
  File "/Users/xxx/.local/anaconda3/envs/gs-3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/xxx/.local/anaconda3/envs/gs-3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/xxx/Dev/GraphScope/coordinator/gscoordinator/__main__.py", line 1, in <module>
    from gscoordinator.coordinator import launch_graphscope
  File "/Users/xxx/Dev/GraphScope/coordinator/gscoordinator/coordinator.py", line 41, in <module>
    from packaging import version
ModuleNotFoundError: No module named 'packaging'

Environment (please complete the following information):

lidongze0629 commented 3 years ago

The packaging package to be installed by default in our environments; I think you can try to fix it by installing the packaging module manually--either using pip install packaging or conda install packaging.

acezen commented 3 years ago

pip3 install packaging work, and I think we should put packaging to requirements.txt of gscoordinator.

lidongze0629 commented 3 years ago

Thanks for bringing this up! The issue arises from not having the packaging module installed, and as you found, installing packaging manually fixes it.

We didn't have the module required in GraphScopedetails because it happened to be installed by default in our environments; we didn't realize that not everyone would have it by default. We are going to added it to the pip install requirements, so in all future versions it will be installed automatically if someone doesn't already have it.

So for now, if anyone else has this issue, they can fix it by installing the packaging module manually--either using pip install packaging or conda install packaging.

yecol commented 3 years ago

@lidongze0629 can this issue be fixed in release v0.6?

lidongze0629 commented 3 years ago

Fixes in Release v0.6.0