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.

can torchvision build from source on windows?

See original GitHub issue

I have got the pt model of mask rcnn, and now I want to use it on C++, does libtoch seem to not support it? This seems to require torchvison build from source, but I failed. Does torchvison build support window? Or do I need to pay attention to something?

`git clone https://github.com/pytorch/vision.git

cd vision

mkdir build

cd build

cmake -DCMAKE_PREFIX_PATH=“D:\libtorch;D:\pybind11” …`

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Myxrfcommented, Sep 29, 2021

@mszhanyi Do you mean that I only need to run the command python setup.py install instead of the cmake command?

I ran python setup.py install and got this result Using d:\programdata\anaconda3\envs\pytorch11.1\lib\site-packages Finished processing dependencies for torchvision==0.9.0a0

If this indicates success, where is the compiled torchvision installed, and how should I include it in C++

0reactions
mszhanyicommented, Sep 30, 2021

@Myxrf I know your question now. Before running cmake -DCMAKE_PREFIX_PATH="E:\libtorch\libtorch;E:\pybind11-master\pybind11-master\build" .. Try to run conda install -c conda-forge libjpeg-turbo and conda install -c anaconda zlib

I think you’ve referred to https://discuss.pytorch.org/t/building-torchvision-c-api-from-source/68281

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing torchvision from source
If you want to install torchvision from source, then go to torchvision source and then install is at as a separate package. Torchvision...
Read more >
Can't build windows torchVsion C++ API library · Issue #5277
I try to use TorchVision c++ API in windows10. I follow https://github.com/pytorch/vision Using the models on C++. I download libtorch1.10.1- ...
Read more >
Install and configure PyTorch on your machine.
Now, you can install PyTorch package from binaries via Conda. Navigate to https://pytorch.org/. Select the relevant PyTorch installation ...
Read more >
How to Install PyTorch on Windows Step by Step
Install Anaconda · Open Anaconda Prompt (NOT Anaconda Navigator) · conda install pytorch -c pytorch · pip install torchvision · Add environment to ......
Read more >
Installation — detectron2 0.6 documentation
If the error comes from detectron2 or torchvision that you built manually from source, remove files you built ( build/ , **/*.so )...
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