Closed NoHateAnymore closed 3 years ago
Maybe you should try it in linux sys. I believe the code is build for linux,not for windows.
man,I have same problem in ubuntu
I have the same problem running build running build_ext building '._C' extension Emitting ninja build file /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/build/temp.linux-x86_64-3.7/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/3] /usr/local/cuda-8.0/bin/nvcc -DWITH_CUDA -I/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-8.0/include -I/home/he/anaconda3/include/python3.7m -c -c /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/syncbn_cuda.cu -o /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/build/temp.linux-x86_64-3.7/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/syncbn_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14 FAILED: /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/build/temp.linux-x86_64-3.7/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/syncbn_cuda.o /usr/local/cuda-8.0/bin/nvcc -DWITH_CUDA -I/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-8.0/include -I/home/he/anaconda3/include/python3.7m -c -c /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/syncbn_cuda.cu -o /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/build/temp.linux-x86_64-3.7/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/syncbn_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14 nvcc fatal : Value 'c++14' is not defined for option 'std' [2/3] /usr/local/cuda-8.0/bin/nvcc -DWITH_CUDA -I/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-8.0/include -I/home/he/anaconda3/include/python3.7m -c -c /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/ca_cuda.cu -o /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/build/temp.linux-x86_64-3.7/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/ca_cuda.o -D__CUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14 FAILED: /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/build/temp.linux-x86_64-3.7/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/ca_cuda.o /usr/local/cuda-8.0/bin/nvcc -DWITH_CUDA -I/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-8.0/include -I/home/he/anaconda3/include/python3.7m -c -c /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/ca_cuda.cu -o /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/build/temp.linux-x86_64-3.7/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/ca_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14 nvcc fatal : Value 'c++14' is not defined for option 'std' [3/3] /usr/local/cuda-8.0/bin/nvcc -DWITH_CUDA -I/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-8.0/include -I/home/he/anaconda3/include/python3.7m -c -c /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/psa_cuda.cu -o /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/build/temp.linux-x86_64-3.7/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/psa_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14 FAILED: /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/build/temp.linux-x86_64-3.7/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/psa_cuda.o /usr/local/cuda-8.0/bin/nvcc -DWITH_CUDA -I/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/he/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-8.0/include -I/home/he/anaconda3/include/python3.7m -c -c /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/psa_cuda.cu -o /home/he/awesome-semantic-segmentation-pytorch-master/core/nn/build/temp.linux-x86_64-3.7/home/he/awesome-semantic-segmentation-pytorch-master/core/nn/csrc/cuda/psa_cuda.o -D__CUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14 nvcc fatal : Value 'c++14' is not defined for option 'std' ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/he/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1515, in _run_ninja_build env=env) File "/home/he/anaconda3/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 55, in
man,I have same problem in ubuntu
Have you solved your problem? I have the same problem!
i have the same question
I have the similar problem. running build running build_ext /home/hxy/.local/lib/python3.6/site-packages/torch/utils/cpp_extension.py:335: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) running develop running egg_info writing semantic_segmentation.egg-info/PKG-INFO writing dependency_links to semantic_segmentation.egg-info/dependency_links.txt writing top-level names to semantic_segmentation.egg-info/top_level.txt reading manifest file 'semantic_segmentation.egg-info/SOURCES.txt' writing manifest file 'semantic_segmentation.egg-info/SOURCES.txt' running build_ext copying build/lib.linux-x86_64-3.6/_C.cpython-36m-x86_64-linux-gnu.so -> Creating /usr/local/lib/python3.6/dist-packages/semantic-segmentation.egg-link (link to .) semantic-segmentation 0.1 is already the active version in easy-install.pth
Installed /home/hxy/awesome-semantic-segmentation-pytorch/core/nn Processing dependencies for semantic-segmentation==0.1 Finished processing dependencies for semantic-segmentation==0.1 Have you solved your problem?
Same here. I am not far into the problem, but it seems to have problems to compile the extensions.
EDIT: So now I figured out my problem (seems like finishing the building process complete, with just a few deprecation warnings), but your problem might differ. I try to respond as most as I can.
@keyboardmilk: At least you printed the complete error message. Your problem seems to be your cuda version. Your Error message says: nvcc fatal : Value 'c++14' is not defined for option 'std'
. This might be the problem of this issue but I am not completly shure: https://github.com/pytorch/pytorch/issues/32135
@Minghy: It seems you dont have my problem, but you also cut your Error message after the compilations try. If you have the same error message as @keyboardmilk you might have a similar problem.
My actual problem: I was missing Python.h file. It was installed for older versions of Python, but for the one I used. So my fix was simply this: sudo apt-get install Python3.8-dev
I also have the same question,have you solved? `The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "setup.py", line 49, in
@zhyunxiang As I mentioned in my solution the problem was not inside the python setup script. It was a problem in compile time of the C++ libraries.
As your message prints out : The above exception was the direct cause of the following exception:
you have a similar problem inside the C++ compile time. Look up your output above this line. Somewher you might find the information you need. If the Output says: missing Python.h
you probably need to install the devkit for your Python Env. Since I am using Python3.8 I needed to install python3.8-dev. Before you start installing it you might want to locate it first:
> locate Python.h
/usr/include/python3.8/Python.h
The output above is what I see on my System. If you locate it not in your venv or /usr/include/ maybe something went wrong with your pathing.
If you got a similar message as @keyboardmilk you might endup installing the wrong cuda setup.
@MaKaNu Thanks a lot! You're right, I've solved the problem.
I type "python setup.py build develop" and there are some errors I can not solve them.
There is error information:
my pc System: Win10 Python: 3.7.7 pytorch: 1.5.0 cudatoolkit : 10.1.243 cudnn: 7.6.5
Can anyone help me? Thanks~