question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: DLL load failed on Windows

See original GitHub issue

I have a dll load failed the specified module could not be found error when importing torchvision

PyTorch stable 1.1:

C:\Windows\system32>python -m pip install https://download.pytorch.org/whl/cu100/torch-1.1.0-cp37-cp37m-win_amd64.whl
Collecting torch==1.1.0 from https://download.pytorch.org/whl/cu100/torch-1.1.0-cp37-cp37m-win_amd64.whl
  Using cached https://download.pytorch.org/whl/cu100/torch-1.1.0-cp37-cp37m-win_amd64.whl
Requirement already satisfied: numpy in c:\python37\lib\site-packages (from torch==1.1.0) (1.16.4+mkl)
Installing collected packages: torch
Successfully installed torch-1.1.0

C:\Windows\system32>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> import torchvision
>>> exit()

Nightly:


C:\Windows\system32>python -m pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cu100/torch_nightly.html
Looking in links: https://download.pytorch.org/whl/nightly/cu100/torch_nightly.html
Collecting torch_nightly
  Using cached https://download.pytorch.org/whl/nightly/cu100/torch_nightly-1.1.0.dev20190612-cp37-cp37m-win_amd64.whl
Installing collected packages: torch-nightly
Successfully installed torch-nightly-1.1.0.dev20190612

C:\Windows\system32>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> import torchvision
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python37\lib\site-packages\torchvision\__init__.py", line 1, in <module>
    from torchvision import models
  File "C:\Python37\lib\site-packages\torchvision\models\__init__.py", line 11, in <module>
    from . import detection
  File "C:\Python37\lib\site-packages\torchvision\models\detection\__init__.py", line 1, in <module>
    from .faster_rcnn import *
  File "C:\Python37\lib\site-packages\torchvision\models\detection\faster_rcnn.py", line 7, in <module>
    from torchvision.ops import misc as misc_nn_ops
  File "C:\Python37\lib\site-packages\torchvision\ops\__init__.py", line 1, in <module>
    from .boxes import nms, box_iou
  File "C:\Python37\lib\site-packages\torchvision\ops\boxes.py", line 2, in <module>
    from torchvision import _C
ImportError: DLL load failed: La procédure spécifiée est introuvable.
>>>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:25 (10 by maintainers)

github_iconTop GitHub Comments

6reactions
zemelLeongcommented, Jun 29, 2019

cuda10:conda install pytorch torchvision cudatoolkit=10.0 -c pytorch cuda9:conda install pytorch torchvision cudatoolkit=9.0 -c pytorch none cuda:conda install pytorch-cpu torchvision-cpu -c pytorch

3reactions
peterjc123commented, Aug 11, 2019

@anemes Yes, that’s because we didn’t upload torchvision 0.4.0 for Windows. I’ll tell you when it’s ready.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve "ImportError: DLL load failed:" on Python?
1) In console Anaconda CMD type echo %path% to see where your anaconda is installed. 2) In spyder's python console you can enter...
Read more >
How to Fix Python ImportError: Dll Load Failed Error
In most cases, the error occurs when you import a library. The cause of the error may be incorrect/incomplete installation or incompatibility of...
Read more >
DLL load failed: The Specified Module Could not be Found
The DLL load failed or ImportError: DLL load failed means that any specific module is not downloaded properly. The error code also indicates...
Read more >
How to fix “ImportError: DLL load failed: The specified module ...
To fix the "ImportError: DLL load failed: The specified module could not be found" error in Python 3, you will need to ensure...
Read more >
[SOLVED] How to solve ImportError:DLL load failed - YouTube
This is the problem that occurs while opening the jupyter ... [SOLVED] How to solve ImportError : DLL load failed : The specified...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found