google-deepmind / launchpad

Apache License 2.0
309 stars 35 forks source link

Cannot import name 'py_client' from 'courier.python' (unknown location) #38

Open ChufanSuki opened 1 year ago

ChufanSuki commented 1 year ago

When I tried to build launchpad following this. I got:

./run_python_tests.sh 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/launchpad/launchpad/__init__.py", line 36, in <module>
    from launchpad.nodes.courier.node import CourierHandle
  File "/tmp/launchpad/launchpad/nodes/courier/node.py", line 21, in <module>
    import courier
  File "/tmp/launchpad/courier/__init__.py", line 26, in <module>
    from courier.python.client import Client  # pytype: disable=import-error
  File "/tmp/launchpad/courier/python/client.py", line 31, in <module>
    from courier.python import py_client
ImportError: cannot import name 'py_client' from 'courier.python' (unknown location)
eugeneteoh commented 1 year ago

See https://github.com/deepmind/launchpad/issues/30#issuecomment-1532075640

youliangtan commented 12 months ago

I faced the error of:

  File "/home/youliang/miniconda3/envs/jaxrl/lib/python3.10/site-packages/courier/python/client.py", line 30, in <module>
    from courier.python import py_client
ImportError: /home/youliang/miniconda3/envs/jaxrl/lib/python3.10/site-packages/courier/python/libserialization_cc_proto.so: undefined symbol: _ZN6google8protobuf7Message19CopyWithSourceCheckERS1_RKS1_

Uninstall the dm-launchpad[tensorflow] and pip3 install dp launchpad without tensorflow and dep checks kinda fix it for now.

pip install dm-launchpad