PyTorch-Encoding icon indicating copy to clipboard operation
PyTorch-Encoding copied to clipboard

problem on setup.py under windows

Open zhao181 opened this issue 6 years ago • 0 comments

When I run "python setup.py install" in the folder A:\semantic\PyTorch-Encoding\encoding\lib\cpu It issues the following errors,

C:\ProgramData\Anaconda3\lib\site-packages\torch\lib\include\c10/util/Exception.h(29): warning C4251: 'c10::Error::backtrace_': class 'std::basic_string<char,std::char_traits,std::allocator>' needs to have dll-interface to be used by clients of class 'c10::Error' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xstring(2633): note: see declaration of 'std::basic_string<char,std::char_traits,std::allocator>' C:\ProgramData\Anaconda3\lib\site-packages\torch\lib\include\c10/util/Exception.h(34): warning C4251: 'c10::Error::msg_': class 'std::basic_string<char,std::char_traits,std::allocator>' needs to have dll-interface to be used by clients of class 'c10::Error' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xstring(2633): note: see declaration of 'std::basic_string<char,std::char_traits,std::allocator>' C:\ProgramData\Anaconda3\lib\site-packages\torch\lib\include\c10/util/Exception.h(35): warning C4251: 'c10::Error::msg_without_backtrace_': class 'std::basic_string<char,std::char_traits,std::allocator>' needs to have dll-interface to be used by clients of class 'c10::Error' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xstring(2633): note: see declaration of 'std::basic_string<char,std::char_traits,std::allocator>' C:\ProgramData\Anaconda3\lib\site-packages\torch\lib\include\c10/core/Allocator.h(126): warning C4251: 'c10::InefficientStdFunctionContext::ptr_': class 'std::unique_ptr<void,std::function<void (void *)>>' needs to have dll-interface to be used by clients of struct 'c10::InefficientStdFunctionContext' C:\ProgramData\Anaconda3\lib\site-packages\torch\lib\include\c10/core/Allocator.h(126): note: see declaration of 'std::unique_ptr<void,std::function<void (void *)>>' C:\ProgramData\Anaconda3\lib\site-packages\torch\lib\include\c10/core/TensorTypeIdRegistration.h(32): warning C4251: 'c10::TensorTypeIdCreator::last_id_': struct 'std::atomic' needs to have dll-interface to be used by clients of class 'c10::TensorTypeIdCreator' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xxatomic(180): note: see declaration of 'std::atomic' C:\ProgramData\Anaconda3\lib\site-packages\torch\lib\include\c10/core/TensorTypeIdRegistration.h(45): warning C4251: 'c10::TensorTypeIdRegistry::registeredTypeIds_': class 'std::unordered_set<c10::TensorTypeId,std::hashc10::TensorTypeId,std::equal_to<_Kty>,std::allocator<_Kty>>' needs to have dll-interface to be used by clients of class 'c10::TensorTypeIdRegistry'

Can anyone help solve the problem?

zhao181 avatar Jan 02 '20 10:01 zhao181