Skip to content

ImportError: DLL load failed: The specified module could not be found. #158

Open

Description

I get the following error with versions greater than 1.0 when importing rapidjson:

ImportError: DLL load failed: The specified module could not be found.

Activity

  1. lelit commented on Jul 14, 2021

    @lelit
    Contributor

    That's strange: on one hand little has changed since version 1.0, and on the other, Windows specific tests pass...

    Are you sure you are trying to load the package with the right Python interpreter, the one used to install it?

    Does python -v -c "import rapidjson" emit something that may help diagnosing the problem?

  2. lelit commented on Jul 14, 2021

    @lelit
    Contributor

    I never used pipenv, so take this with a grain of salt: shouldn't you enter into / activate the virtualenv in some way, before trying to load the package?

  3. lelit commented on Jul 15, 2021

    @lelit
    Contributor

    So, that output does not help. Can you check the output of python -c "import sys; print(sys.path)", and see if you can spot a difference between where it works and where it does not?

  4. lelit commented on Jul 15, 2021

    @lelit
    Contributor

    Also, have you tried creating a new virtualenv from scratch and see if it does make any difference?

  5. lelit commented on Jul 16, 2021

    @lelit
    Contributor

    Great, so the problem is with the pipenv tool, that selected the wrong architecture?

  6. lelit commented on Jul 16, 2021

    @lelit
    Contributor

    No: binary wheels are built by an automatic process, and you can see that PyPI carries both the 32 bit and the 64 bit wheels.
    So I still think that the problem is related to why one of your pipenv environments selected the wrong package.

  7. lelit commented on Jul 16, 2021

    @lelit
    Contributor

    As said, I do not use pipenv and neither Windows, so I can be of very little help there, sorry!
    But I assume that pipenv emits log when it install the packages...
    Can you inspect python3 -c "import sys;print(sys.implementation)", that should contain some information about the underlying architecture (for example, mine shows _multiarch='x86_64-linux-gnu', and then I find rapidjson.cpython-39-x86_64-linux-gnu.so under env/lib/python3.9/site-packages).

  8. lelit commented on Jul 16, 2021

    @lelit
    Contributor

    Sure, enjoy your pause!

  9. lelit commented on Aug 12, 2021

    @lelit
    Contributor

    Yes, it could be. As said, unfortunately I'm not able to provide useful help, as I do not have Windows machines around.
    Are you able to collect some info about that dependency, like version or the like?

  10. vellrya commented on Nov 26, 2021

    @vellrya

    Solution is very easy: we should install Visual C++ Redistributable package first.

    It can be downloaded from here: https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist

  11. lelit commented on Nov 27, 2021

    @lelit
    Contributor

    Solution is very easy: we should install Visual C++ Redistributable package first.

    Thank you! Maybe we could add a note somewhere...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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