Skip to content

ModuleNotFoundError: No module named 'orjson.orjson' #165

Open
@mvukov

Description

@mvukov

mvukov/optimus#81:

This is what I get on my local machine w/ Ubuntu 22.04 (I also got the same error or another machine w/ the same OS).

bazel run //:refresh_compile_commands
INFO: Analyzed target //:refresh_compile_commands (77 packages loaded, 619 targets configured).
INFO: Found 1 target...
Target //:refresh_compile_commands up-to-date:
  bazel-bin/_refresh_compile_commands
  bazel-bin/refresh_compile_commands.py
INFO: Elapsed time: 0.698s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/refresh_compile_commands
Traceback (most recent call last):
  File "/home/user/.cache/bazel/_bazel_user/bc887fb8be44eda01eb72d2d7b5a5d13/execroot/_main/bazel-out/k8-fastbuild-ST-647a15afa184/bin/refresh_compile_commands.runfiles/_main/refresh_compile_commands.py", line 20, in <module>
    import orjson # orjson is much faster than the standard library's json module (1.9 seconds vs 6.6 seconds for a ~140 MB file). See https://github.com/hedronvision/bazel-compile-commands-extractor/pull/118
  File "/home/user/.cache/bazel/_bazel_user/bc887fb8be44eda01eb72d2d7b5a5d13/execroot/_main/bazel-out/k8-fastbuild-ST-647a15afa184/bin/refresh_compile_commands.runfiles/hedron_compile_commands_pip_orjson/site-packages/orjson/__init__.py", line 3, in <module>
    from .orjson import *
ModuleNotFoundError: No module named 'orjson.orjson'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions