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.

Unable to build torchvision on Windows (installed torch from source and it is running)

See original GitHub issue

❓ Questions and Help

I have installed torch successfully in my PC via source, but I am facing this issue while installing the torchvison. I don’t think I can install torchvision via pip as it is re-downloading the torch.

Please help me to install it

TIA i used python setup.py install

Building wheel torchvision-0.9.0a0+01dfa8e
PNG found: True
Running build on conda-build: False
Running build on conda: True
JPEG found: True
Building torchvision with JPEG image support
FFmpeg found: True
Traceback (most recent call last):
  File "C:\Users\dhawals\repos\build_binaries\vision\setup.py", line 472, in <module>
    ext_modules=get_extensions(),
  File "C:\Users\dhawals\repos\build_binaries\vision\setup.py", line 352, in get_extensions
    platform_tag = subprocess.run(
  File "C:\Users\dhawals\miniconda3\lib\subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\dhawals\miniconda3\lib\subprocess.py", line 947, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\dhawals\miniconda3\lib\subprocess.py", line 1356, in _execute_child
    args = list2cmdline(args)
  File "C:\Users\dhawals\miniconda3\lib\subprocess.py", line 561, in list2cmdline
    for arg in map(os.fsdecode, seq):
  File "C:\Users\dhawals\miniconda3\lib\os.py", line 822, in fsdecode
    filename = fspath(filename)  # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not NoneType

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
datumboxcommented, Jun 8, 2021

Awesome, thanks for confirming.

The size_t is an unrelated headache as you said. You can read more about it here https://github.com/pytorch/vision/pull/3777#issuecomment-832656199. The fix that you quoted is a workaround and we still look for a better fix.

The version should not be an issue. Just make sure you pull the latest master and install the pytorch from nightly as described in our contribution guide.

0reactions
fmassacommented, Jun 14, 2021

@andfoy PyTorch only builds CI with MSVC, so we should probably keep MSVC as well.

I think we might have some parts in our setup.py for video which might not work well on Windows, we should double-check that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not obvious how to install torchvision with PyTorch source build
Previously, it used to be possible to build PyTorch from source, and then pip install torchvision and get torchvision available.
Read more >
Can't install pytorch with pip on Windows - Stack Overflow
I tried multiple solutions and it wasn't working on Windows 10 until I tried this: pip install torch==1.5.0+cpu -f ...
Read more >
Unable to installe torch and torchvision with the package ...
Hi,. When I try to install torch and torchvision in my environnement for python it's always fail. I receive this message : -----...
Read more >
15. TorchServe on Windows - PyTorch
15.3. Install from binaries · Start 'Anaconda Powershell Prompt' (APP) as Admin User i.e. By right click on APP and run following commands...
Read more >
Install Pytorch on Windows - GeeksforGeeks
Method 1: Using pip · 1. Compute Platform: CUDA 10.2, Nvidia Driver version should be >= 441.22. pip3 install torch==1.8.1+cu102 torchvision==0.9 ...
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