So I am trying to install from source so as to use the torchvision models. But when installing, I ran into the following errors. I searched through the issues but none seems to be related to mine. Here is the error log
Building wheel torchvision-0.3.0a0+2287c8f
running install
running bdist_egg
running egg_info
writing torchvision.egg-info/PKG-INFO
writing dependency_links to torchvision.egg-info/dependency_links.txt
writing requirements to torchvision.egg-info/requires.txt
writing top-level names to torchvision.egg-info/top_level.txt
reading manifest file 'torchvision.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
writing manifest file 'torchvision.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying torchvision/version.py -> build/lib.linux-x86_64-3.7/torchvision
running build_ext
building 'torchvision._C' extension
gcc -pthread -B /home/jeremiah/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jeremiah/vision/torchvision/csrc -I/home/jeremiah/miniconda3/lib/python3.7/site-packages/torch/lib/include -I/home/jeremiah/miniconda3/lib/python3.7/site-packages/torch/lib/include/TH -I/home/jeremiah/miniconda3/lib/python3.7/site-packages/torch/lib/include/THC -I/home/jeremiah/miniconda3/include/python3.7m -c /home/jeremiah/vision/torchvision/csrc/vision.cpp -o build/temp.linux-x86_64-3.7/home/jeremiah/vision/torchvision/csrc/vision.o -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/jeremiah/vision/torchvision/csrc/ROIAlign.h:3:0,
from /home/jeremiah/vision/torchvision/csrc/vision.cpp:1:
/home/jeremiah/vision/torchvision/csrc/cpu/vision_cpu.h:2:29: fatal error: torch/extension.h: No such file or directory
#include <torch/extension.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
I have intslled python-dev
Python_version is 3.7.3
gcc (Debian 6.3.0-18+deb9u1) 6.3.0
Linux system.
Any help?
same issue
python 2.7
gcc 5.4.0
linux
Hi @mark0620 so what I did is I decided not to build from source anymore. So I just updated my torchvision model to the latest version. 0.3.0. If you finally find a solution to building from source, do comment.
@jerofad what is your PyTorch version?
Note that torchvision requires a very recent version of PyTorch
@fmassa Pytorch version is 1.1.0
@jerofad this is not expected. TorchVision master works with 1.1.
I think your system might be picking a wrong python while compiling torchvision, which has an older version of PyTorch.
Anyway, we are working on having nightlies for torchvision, which should fix the issue for you as you'll be able to just install from the nightly
Most helpful comment
@jerofad this is not expected. TorchVision master works with 1.1.
I think your system might be picking a wrong python while compiling torchvision, which has an older version of PyTorch.
Anyway, we are working on having nightlies for torchvision, which should fix the issue for you as you'll be able to just install from the nightly