Pytorch import error

Hi everybody,

I git clone the latest pytorch from github and build it correctly, but when i import torch, it goes wrong as undefined symbol: _ZNSt12bad_weak_ptrD1Ev. Anybody for helps and thanks very much.
And i use python3.6.5 and gcc4.9.1

Could you cd pytorch/build/lib.linux-x86_64-2.7/torch (or wherever the build folder is) and then ldd and see what the output is?

The error suggests that it can’t find std::bad_weak_ptr, which might mean something is wrong with the linking with libstdc++