Bug 252871 - math/py-jax: Fails to run: ModuleNotFoundError: No module named 'jaxlib' (new port required)
Summary: math/py-jax: Fails to run: ModuleNotFoundError: No module named 'jaxlib' (new...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Po-Chuan Hsieh
URL: https://github.com/google/jax/issues/...
Keywords: needs-qa
: 254320 (view as bug list)
Depends on:
Reported: 2021-01-20 21:23 UTC by Thibault Payet
Modified: 2021-03-16 01:00 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Note You need to log in before you can comment on or make changes to this bug.
Description Thibault Payet 2021-01-20 21:23:25 UTC
When importing jax

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/jax/__init__.py", line 22, in <module>
    from .api import (
  File "/usr/local/lib/python3.7/site-packages/jax/api.py", line 37, in <module>
    from . import core
  File "/usr/local/lib/python3.7/site-packages/jax/core.py", line 31, in <module>
    from . import dtypes
  File "/usr/local/lib/python3.7/site-packages/jax/dtypes.py", line 31, in <module>
    from .lib import xla_client
  File "/usr/local/lib/python3.7/site-packages/jax/lib/__init__.py", line 23, in <module>
    import jaxlib
ModuleNotFoundError: No module named 'jaxlib'
Comment 1 Yuri Victorovich freebsd_committer 2021-03-15 22:56:16 UTC
*** Bug 254320 has been marked as a duplicate of this bug. ***
Comment 2 Yuri Victorovich freebsd_committer 2021-03-16 01:00:03 UTC
jaxlib is a separate library that is also a part of the Jax project on GitHub.

Sadly, Google again uses bazel to build it and bazel fails to build it: https://github.com/google/jax/issues/6076
Comment 3 Yuri Victorovich freebsd_committer 2021-03-16 01:00:52 UTC
It seems like Bazel can only work inside of Google's environment and fails in the wild.