Skip to content

AttributeError: partially initialized module 'jax' has no attribute 'version' (most likely due to a circular import) #29000

Open
@mvds314

Description

@mvds314

Description

I get an error on importing jax in the Spyder IDE. In a normal python or ipython terminal it seems to work fine.
I am not 100% whether it's a Spyder issue or a jax issue.

With jax 0.5.3 everything works fine, as soon as I upgrade to 0.6 or higher I get the error below.

Traceback (most recent call last):

  Cell In[2], line 1
    import jax

  File C:\...\WPy64-31290\python\Lib\site-packages\jax\__init__.py:25
    from jax._src.cloud_tpu_init import cloud_tpu_init as _cloud_tpu_init

  File C:\...\WPy64-31290\python\Lib\site-packages\jax\_src\cloud_tpu_init.py:20
    from jax._src import config

  File C:\...\WPy64-31290\python\Lib\site-packages\jax\_src\config.py:27
    from jax._src.lib import guard_lib

  File C:\...\WPy64-31290\python\Lib\site-packages\jax\_src\lib\__init__.py:76
    jax_version=jax.version.__version__,

AttributeError: partially initialized module 'jax' has no attribute 'version' (most likely due to a circular import)
import jax

System info (python version, jaxlib version, accelerator, etc.)

Winpython 3.13.3
jax 0.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions