Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

software dependence error #7

Closed
blueardour opened this issue Feb 11, 2019 · 5 comments
Closed

software dependence error #7

blueardour opened this issue Feb 11, 2019 · 5 comments

Comments

@blueardour
Copy link

hi, @ycszen

Sorry to disturb you. This project is so attractive that I want to re-produce the result with it. However, when I tried to run train.py in TorchSeg/model/dfn/voc.dfn.R101_v1c. It gave several warnings and errors. They were the software dependence issues. This I wonder if you could share your software version in your environment.

My is: centos7.5 + python3.6.8 + pytorch1.0 + cuda9.0 + gcc-4.9.4.

Error message:

`
/home/cat/.pyenv/versions/3.6.8/lib/python3.6/site-packages/torch/utils/cpp_extension.py:166: UserWarning:

                           !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using c++, and then you can also use
c++ to compile your extension.

See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

platform=sys.platform))
Traceback (most recent call last):
File "train.py", line 24, in
from apex.parallel import DistributedDataParallel, SyncBatchNorm
ModuleNotFoundError: No module named 'apex'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 27, in
"Please install apex from https://www.github.com/nvidia/apex .")
ImportError: Please install apex from https://www.github.com/nvidia/apex .

`

When I tried to install apex by pip install apex, it gave
In file included from /home/chenp/.pyenv/versions/3.6.8/include/python3.6m/Python.h:39:0, from cryptacular/bcrypt/_bcrypt.c:26: crypt_blowfish-1.2/crypt.h:17:23: fatal error: gnu-crypt.h: No such file or directory #include <gnu-crypt.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1

@ycszen
Copy link
Owner

ycszen commented Feb 12, 2019

Hi, my software environments are as follows:

Ubuntu 16.04
PyTorch 1.0
Python 3.5.2
Cuda 9.0
GCC 5.4.0

According to my experimence, the warning you showed is normal. Then you should install the apex to use the multi-process-sync-bn.

@daodaofr
Copy link

hi, @ycszen.
I got a similar issue, when I run "python train.py -d 0-2", it gives a segmentation fault.
Do you have any idea ?

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                          !! WARNING !!

platform=sys.platform))
/home/daodao/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py:166: UserWarning:

                           !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using c++, and then you can also use
c++ to compile your extension.

See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                          !! WARNING !!

platform=sys.platform))
13 10:32:26 PyTorch Version 1.0.0, Furnace Version 0.1.1
13 10:32:26 using devices 0, 1, 2
[00:00<?,?it/s]Segmentation fault (core dumped)

@blueardour
Copy link
Author

thanks very much @ycszen
I have successfully run the script.

@Mr-doooog
Copy link

@daodaofr Did you solve this question? I meet the same one

@daodaofr
Copy link

@Mr-doooog I was using the wrong labels (*_color.png), you need to use *_labelledIds.png.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants