zhanghang1989 / PyTorch-Encoding

A CV toolkit for my papers.
https://hangzhang.org/PyTorch-Encoding/
MIT License
2.04k stars 452 forks source link

problem on setup.py under windows #239

Open zhao181 opened 4 years ago

zhao181 commented 4 years ago

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::chartraits,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_withoutbacktrace': 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::chartraits,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::lastid': 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::hash,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?