{"record":{"id":"012fa36681a78f9c","repo":"jax-ml/jax","slug":"jax-requires-ml-dtypes-version-0-5-or-newer-insta","errorCode":null,"errorMessage":"JAX requires ml_dtypes version 0.5 or newer; installed version is {ml_dtypes.__version__}.","messagePattern":"JAX requires ml_dtypes version 0\\.5 or newer; installed version is (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"jax/_src/dtypes.py","lineNumber":49,"sourceCode":"\nimport ml_dtypes\nimport numpy as np\n\nfrom jax._src import config\nfrom jax._src import traceback_util\nfrom jax._src.lib import _jax\nfrom jax._src.typing import Array, DType, DTypeLike\nfrom jax._src.util import StrictABC, set_module, cache\n\ntraceback_util.register_exclusion(__file__)\n\ntry:\n  _ml_dtypes_version = tuple(map(int, ml_dtypes.__version__.split('.')[:3]))\nexcept:\n  pass\nelse:\n  if _ml_dtypes_version < (0, 5):\n    raise ValueError(\"JAX requires ml_dtypes version 0.5 or newer; \"\n                     f\"installed version is {ml_dtypes.__version__}.\")\n\nexport = set_module('jax.dtypes')\n\n@export\nclass extended(np.generic):\n  \"\"\"Scalar class for extended dtypes.\n\n  This is an abstract class that should never be instantiated, but rather\n  exists for the sake of `jnp.issubdtype`.\n\n  Examples:\n    >>> from jax import random\n    >>> from jax import dtypes\n    >>> key = random.key(0)\n    >>> jnp.issubdtype(key.dtype, dtypes.extended)\n    True\n  \"\"\"","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/dtypes.py#L31-L67","documentation":"At import time, jax._src.dtypes verifies the installed ml_dtypes package is >= 0.5.0 because JAX relies on APIs introduced in that version (bfloat16/fp8 handling, etc.). An older version raises ValueError and JAX import fails.","triggerScenarios":"Installing/upgrading jax while an old ml_dtypes (<0.5) remains in the environment; constraints files pinning ml_dtypes to an old version; stale conda environments.","commonSituations":"pip install jax without upgrading ml_dtypes; docker images with pinned old ml_dtypes; dependency resolvers keeping back ml_dtypes.","solutions":["pip install -U 'ml_dtypes>=0.5'","Reinstall jax so pip resolves deps: pip install -U jax (or jax[cuda12]) which pulls a compatible ml_dtypes","Check for conflicting pins in requirements.txt/constraints and remove old ml_dtypes pins","In conda envs, update both jax and ml_dtypes from the same channel"],"exampleFix":"# before\nml_dtypes==0.4.0 in environment\n\n# after\npip install -U 'ml_dtypes>=0.5'","handlingStrategy":"validation","validationCode":"import ml_dtypes\nassert tuple(map(int, ml_dtypes.__version__.split('.')[:2])) >= (0, 5), 'upgrade: pip install -U ml_dtypes>=0.5'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install jax with its extra (pip install 'jax[cuda12]') so deps resolve together","Keep requirements unpinned for ml_dtypes or pin >=0.5"],"tags":["jax","dependency","version","ml-dtypes"],"backgroundTag":"dependency-version-mismatch","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}