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

Fix windows python 3.8 required dlls not found #6715

Merged
merged 3 commits into from Oct 6, 2022

Conversation

atalman
Copy link
Contributor

@atalman atalman commented Oct 6, 2022

Fixes following issue:

C:\Miniconda\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: Could not find module 'C:\Miniconda\Lib\site-packages\torchvision\image.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
torch: 1.13.0.dev20221006
  warn(f"Failed to load image Python extension: {e}")
torchvision: 0.15.0.dev20221006
torch cuda: 11.7
torch cudnn: 8500
Calling smoke_test_conv2d
Testing smoke_test_conv2d with cuda
Traceback (most recent call last):
  File "C:\Miniconda\lib\site-packages\torch\_ops.py", line 501, in __getattr__
    op, overload_names = torch._C._jit_get_operation(qualified_op_name)
RuntimeError: No such operator image::decode_png

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "./test/smoke_test/smoke_test.py", line 92, in <module>
    main()
  File "./test/smoke_test/smoke_test.py", line 87, in main
    smoke_test_torchvision()
  File "./test/smoke_test/smoke_test.py", line 41, in smoke_test_torchvision
    print("Is torchvision useable?", all(x is not None for x in [torch.ops.image.decode_png, torch.ops.torchvision.roi_align]))
  File "C:\Miniconda\lib\site-packages\torch\_ops.py", line 505, in __getattr__
    raise AttributeError(
AttributeError: '_OpNamespace' 'image' object has no attribute 'decode_png'
Error: Process completed with exit code 1.

Same as: pytorch/audio#2735

@atalman atalman changed the title Fix windows python 3.8 Fix windows python 3.8 required dlls not found Oct 6, 2022
torchvision/extension.py Outdated Show resolved Hide resolved
Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @atalman. I don't have too much context around the windows fixes but I trust your judgment on this. LGTM.

torchvision/extension.py Outdated Show resolved Hide resolved
atalman and others added 3 commits October 6, 2022 07:32
Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
@atalman atalman merged commit 7d2de40 into pytorch:main Oct 6, 2022
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

Hey @atalman!

You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

atalman added a commit to atalman/vision that referenced this pull request Oct 6, 2022
* Fix windows python 3.8

* Update torchvision/extension.py

Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>

* Update torchvision/extension.py

Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
atalman added a commit that referenced this pull request Oct 10, 2022
* Fix windows python 3.8

* Update torchvision/extension.py

Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>

* Update torchvision/extension.py

Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>

Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
facebook-github-bot pushed a commit that referenced this pull request Oct 17, 2022
Summary:
* Fix windows python 3.8

* Update torchvision/extension.py

* Update torchvision/extension.py

Reviewed By: NicolasHug

Differential Revision: D40427461

fbshipit-source-id: 8aeb7eba3dd573b2d700680276cf947d724a1d35

Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants