microsoft / DynamicHead

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed install with `python -m pip install -e DynamicHead`

XiaoyuWant opened this issue · comments

Installing collected packages: dyhead
  Running setup.py develop for dyhead
    ERROR: Command errored out with exit status 1:
     command: /public/home/hpc2/anaconda3/envs/mask/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/public/home/hpc2/rpc/DynamicHead/setup.py'"'"'; __file__='"'"'/public/home/hpc2/rpc/DynamicHead/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /public/home/hpc2/rpc/DynamicHead/
    Complete output (71 lines):
    which: no nvcc in (/public/home/hpc2/anaconda3/envs/mask/bin:/public/home/hpc2/anaconda3/condabin:/usr/lib64/qt-3.3/bin:/public/home/hpc2/perl5/bin:/public/software/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/ibutils/bin:/public/home/hpc2/.local/bin:/public/home/hpc204712181/bin)
    running develop
    running egg_info
    writing dyhead.egg-info/PKG-INFO
    writing dependency_links to dyhead.egg-info/dependency_links.txt
    writing top-level names to dyhead.egg-info/top_level.txt
    reading manifest file 'dyhead.egg-info/SOURCES.txt'
    writing manifest file 'dyhead.egg-info/SOURCES.txt'
    running build_ext
    building 'dyhead._C' extension
    gcc -pthread -B /public/home/hpc2/anaconda3/envs/mask/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/public/home/hpc2/rpc/DynamicHead/dyhead/csrc -I/public/home/hpc2/anaconda3/envs/mask/lib/python3.7/site-packages/torch/include -I/public/home/hpc2/anaconda3/envs/mask/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/public/home/hpc2/anaconda3/envs/mask/lib/python3.7/site-packages/torch/include/TH -I/public/home/hpc2/anaconda3/envs/mask/lib/python3.7/site-packages/torch/include/THC -I/public/home/hpc2/anaconda3/envs/mask/include/python3.7m -c /public/home/hpc2/rpc/DynamicHead/dyhead/csrc/vision.cpp -o build/temp.linux-x86_64-3.7/public/home/hpc204712181/rpc/DynamicHead/dyhead/csrc/vision.o -DTORCH_API_INCLUDE_EXTENSION_H -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 /public/home/hpc204712181/rpc/DynamicHead/dyhead/csrc/vision.cpp:2:0:
    /public/home/hpc2/rpc/DynamicHead/dyhead/csrc/deform_conv.h:10:5: error: ‘at’ has not been declared
         at::Tensor input,
         ^
    /public/home/hpc2/rpc/DynamicHead/dyhead/csrc/deform_conv.h:11:5: error: ‘at’ has not been declared
         at::Tensor weight,
         ^

error: command 'gcc' failed with exit status 1
Error seems that at::Tensor can't be recognized, how to solve this problem?
My gcc version is 5.4.0

@XiaoyuWant How did you solve this issue?

@XiaoyuWant I encountered the same error as yours. How did you solve it?

@kachiO Upgrade pytorch version to 1.3 1 solved my problem