Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing spacy pycharm does not fing cudnn_adv_infer64_8.dll #7496

Closed
enricoversino opened this issue Mar 19, 2021 · 3 comments
Closed

Importing spacy pycharm does not fing cudnn_adv_infer64_8.dll #7496

enricoversino opened this issue Mar 19, 2021 · 3 comments
Labels
gpu Using spaCy on GPU windows Issues related to Windows

Comments

@enricoversino
Copy link

enricoversino commented Mar 19, 2021

Hi everyone.
i've installed spacy 3.0.5 in a virtual env with python 3.8.6, pytorch 1.7.1, cuda 11.0 and related cudnn but when i try to import spacy occurs that error:

Traceback (most recent call last):
  File "D:/lavoro/Lisetta/production/Lisetta_demo2.py", line 8, in <module>
    import spacy
  File "C:\Python38_6\lib\site-packages\spacy\__init__.py", line 10, in <module>
    from thinc.api import prefer_gpu, require_gpu, require_cpu  # noqa: F401
  File "C:\Python38_6\lib\site-packages\thinc\api.py", line 2, in <module>
    from .initializers import normal_init, uniform_init, glorot_uniform_init, zero_init
  File "C:\Python38_6\lib\site-packages\thinc\initializers.py", line 4, in <module>
    from .backends import Ops
  File "C:\Python38_6\lib\site-packages\thinc\backends\__init__.py", line 7, in <module>
    from .ops import Ops
  File "C:\Python38_6\lib\site-packages\thinc\backends\ops.py", line 10, in <module>
    from ..util import get_array_module, is_xp_array, to_numpy
  File "C:\Python38_6\lib\site-packages\thinc\util.py", line 27, in <module>
    import torch
  File "C:\Python38_6\lib\site-packages\torch\__init__.py", line 117, in <module>
    raise err
OSError: [WinError 127] Impossibile trovare la procedura specificata. Error loading "C:\Python38_6\lib\site-packages\torch\lib\cudnn_adv_infer64_8.dll" or one of its dependencies.

That dll is in the path described and everything seems to be ok.
Someone can help me?

Your Environment

  • Operating System:
  • Python Version Used:
  • spaCy Version Used:
  • Environment Information:
@polm polm added gpu Using spaCy on GPU windows Issues related to Windows labels Mar 20, 2021
@polm
Copy link
Contributor

polm commented Mar 20, 2021

So to clarify the error, it happens when loading that DLL as part of importing Torch. Since that DLL is in the right location the issue is that something it depends on is in the wrong location. Looking at Torch issues (pytorch/pytorch#37733) it looks like this might be related to having multiple versions of CUDA installed.

I would recommend you uninstall Torch and then reinstall it and make sure it works on its own. You might want to open an issue at the Torch repo too, since this doesn't seem to be spaCy specific.

@enricoversino
Copy link
Author

Thanks for your answer.
I've solved my issue changing the importation order of libraries. Importing spacy as first library solves "magically" the error.

@github-actions
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
gpu Using spaCy on GPU windows Issues related to Windows
Projects
None yet
Development

No branches or pull requests

2 participants