Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

problem of installation #51

Open
kingbackyang opened this issue Oct 29, 2018 · 16 comments
Open

problem of installation #51

kingbackyang opened this issue Oct 29, 2018 · 16 comments
Labels
question Further information is requested

Comments

@kingbackyang
Copy link

Environment
os: ubuntu 18.04
cuda 9.0
gcc 7.3

bug

the final instruction of install.md pythonsetup.py build develop

running build
running build_py
running build_ext
building 'maskrcnn_benchmark._C' extension
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/hzf/mask_rcnn/maskrcnn-benchmark-master/maskrcnn_benchmark/csrc -I/home/hzf/.local/lib/python3.6/site-packages/torch/lib/include -I/home/hzf/.local/lib/python3.6/site-packages/torch/lib/include/TH -I/home/hzf/.local/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/hzf/anaconda3/envs/maskrcnn_pytorch/include/python3.6m -c /home/hzf/mask_rcnn/maskrcnn-benchmark-master/maskrcnn_benchmark/csrc/vision.cpp -o build/temp.linux-x86_64-3.6/home/hzf/mask_rcnn/maskrcnn-benchmark-master/maskrcnn_benchmark/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/hzf/mask_rcnn/maskrcnn-benchmark-master/maskrcnn_benchmark/csrc/nms.h:3:0,
from /home/hzf/mask_rcnn/maskrcnn-benchmark-master/maskrcnn_benchmark/csrc/vision.cpp:2:
/home/hzf/mask_rcnn/maskrcnn-benchmark-master/maskrcnn_benchmark/csrc/cpu/vision.h:3:10: fatal error: torch/extension.h: no such file or directory
#include <torch/extension.h>
^~~~~~~~~~~~~~~~~~~
compilation terminated.

error: command 'gcc' failed with exit status 1

guess
guess that you didn't push c++ extensions onto github

@yghcats
Copy link

yghcats commented Oct 29, 2018

@kingbackyang
Hi, I also encountered this mistake. Can you tell me how to solve it?
thanks!

@kingbackyang
Copy link
Author

@kingbackyang
Hi, I also encountered this mistake. Can you tell me how to solve it?
thanks!

still stuck in it

@huangr76
Copy link

@kingbackyang @yghcats
Hi,I also encountered this problem.
Please ensure that you have source activate to your conda env before running python setup.py build develop.

@kingbackyang
Copy link
Author

@kingbackyang @yghcats
Hi,I also encountered this problem.
Please ensure that you have source activate to your conda env before running python setup.py build develop.
I surely did what you said. But I still haven't work out it

@yghcats
Copy link

yghcats commented Oct 29, 2018

@huangr76 My conda is OK.

@kingbackyang
Copy link
Author

@huangr76 My conda is OK
I have solved this problem by this website https://www.archlinux.org/packages/community/x86_64/python-pytorch/files/, which contains the complete source code of pytorch 1.0. The code in github is incomplete. I downloaded the packages and substituted the csrc (the compile error filefolder) filefolder for torch filefolder ( in the packages that downloaded). Done

@fmassa
Copy link
Contributor

fmassa commented Oct 29, 2018

Hi,

This problem usually happens because you are not using a nightly version of PyTorch 1.0, but an older version like PyTorch 0.4

Can you print the output of

import torch
print(torch.__version__)

and paste it here?

@fmassa fmassa added the question Further information is requested label Oct 29, 2018
@kingbackyang
Copy link
Author

2018-10-29 17-21-24
You are right. But .....

@fmassa
Copy link
Contributor

fmassa commented Oct 29, 2018

Try uninstalling PyTorch and installing it again. It should fix your issue I think

@yghcats
Copy link

yghcats commented Oct 30, 2018

@kingbackyang Can you tell me about your installation steps?
The downloaded folder contains: bin、lib、share
thanks!

@kingbackyang
Copy link
Author

@kingbackyang Can you tell me about your installation steps?
The downloaded folder contains: bin、lib、share
thanks!

recommend that you should check you installed pytorch version first. And according to the official step of the install.md, there is no problem at all. My bug is about my root environment path and virtual environment path.
Good luck!

@qalid7
Copy link

qalid7 commented Nov 1, 2018

Hi everyone, I'm facing a similar issue where this command conda install pytorch-nightly -c pytorch returns:
PackagesNotFoundError: The following packages are not available from current channels: pytorch-nightly

When I go with conda install pytorch -c pytorch it will automatically install pytorch 0.4. If I continue with the remaining steps it will fail in python setup.py build develop with a similar error as reported above.

Am right in thinking that this is mainly because I'm on Windows 10? It seems like the conda pytoruch-nightly 1.0 is still not supported for Windows.

CUDA 9, latest gcc for Windows.

@kingbackyang
Copy link
Author

Hi everyone, I'm facing a similar issue where this command conda install pytorch-nightly -c pytorch returns:
PackagesNotFoundError: The following packages are not available from current channels: pytorch-nightly

When I go with conda install pytorch -c pytorch it will automatically install pytorch 0.4. If I continue with the remaining steps it will fail in python setup.py build develop with a similar error as reported above.

Am right in thinking that this is mainly because I'm on Windows 10? It seems like the conda pytoruch-nightly 1.0 is still not supported for Windows.

CUDA 9, latest gcc for Windows.

Hi everyone, I'm facing a similar issue where this command conda install pytorch-nightly -c pytorch returns:
PackagesNotFoundError: The following packages are not available from current channels: pytorch-nightly

When I go with conda install pytorch -c pytorch it will automatically install pytorch 0.4. If I continue with the remaining steps it will fail in python setup.py build develop with a similar error as reported above.

Am right in thinking that this is mainly because I'm on Windows 10? It seems like the conda pytoruch-nightly 1.0 is still not supported for Windows.

CUDA 9, latest gcc for Windows.

pytorch
pay attention to the official website of pytorch

@soumith
Copy link
Member

soumith commented Nov 1, 2018

Yes, PyTorch-nightly is not available for Windows yet.

@qalid7
Copy link

qalid7 commented Nov 1, 2018

thanks both, may I ask from -based on previous releases- how long would it take for the Windows release? I can meanwhile entertain myself on a MBP but my main dev is still on Windows.

@JNUpython
Copy link

same problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants