plain-sundown-25537
04/04/2021, 4:49 AMModuleNotFoundError: No module named 'ray'
Traceback (most recent call last):
File "~/.cache/pants/named_caches/pex_root/installed_wheels/a0d5c63d05cf2c837e5e8a0f410c1075f296d621/ray-1.0.1-cp38-cp38-macosx_10_13_x86_64.whl/ray/workers/default_worker.py", line 7, in <module>
import ray
happy-kitchen-89482
04/04/2021, 7:23 AMzipsafe=False
pex? Which version of Pants are you on?enough-analyst-54434
04/04/2021, 5:07 PMplain-sundown-25537
04/04/2021, 5:26 PMenough-analyst-54434
04/04/2021, 5:29 PM$ ./pants package ray_demo
17:27:50.05 [WARN] /home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/2.3.0_py38/lib/python3.8/site-packages/pants/util/memo.py:123: DeprecationWarning: DEPRECATED: defaulting to the legacy pip resolver will be removed in version 2.4.0.dev0.
In Pants 2.4.0, Pants will default to using pip's new resolver. The legacy resolver will be removed in Pants 2.5.
Set `[python-setup].resolver_version = 'pip-2020-resolver` to prepare for the default changing. Refer to <https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-2-2020|https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-2-2020> for more information on the new resolver.
result = func(*args, **kwargs)
17:27:50.14 [INFO] Wrote dist/ray_demo/ray_demo.pex
plain-sundown-25537
04/04/2021, 5:58 PMresolver_version = 'pip-2020-resolver'
plain-sundown-25537
04/04/2021, 6:18 PMpip3.7 install ray
python
> import ray
> ray.init()
Then ray server spins up fine.
However, doing that in pants , it hangs
./pants repl ray_demo
> import ray
I suspect the problem is much deeper, by inspecting the log - the workers complains about missing ray
package.
Then if I manually install ray
into the global env, the workers at least started upplain-sundown-25537
04/04/2021, 6:35 PMenough-analyst-54434
04/04/2021, 6:39 PMplain-sundown-25537
04/04/2021, 6:53 PMvenv
alreadyenough-analyst-54434
04/04/2021, 7:08 PMenough-analyst-54434
04/04/2021, 7:10 PMplain-sundown-25537
04/04/2021, 7:18 PMenough-analyst-54434
04/04/2021, 7:19 PMplain-sundown-25537
04/05/2021, 2:26 AMplain-sundown-25537
04/05/2021, 2:45 AM