facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.67k stars 1.3k forks source link

Windows installation #1692

Open ItayCoifman opened 9 months ago

ItayCoifman commented 9 months ago

Hey I am trying to install pytorch3d on my windows, i have tried few pytorch (2.1 cu 11.8/1.13 cu11.6) versions and it always come to this bug via x64-Native-tools cli... What am i doing wrong?

marching_cubes.obj : error LNK2001: unresolved external symbol "public: long __cdecl at::Tensor::item<long>(void)const " (??$item@J@Tensor@at@@QEBAJXZ) marching_cubes.obj : error LNK2001: unresolved external symbol "public: long * __cdecl at::TensorBase::data_ptr<long>(void)const " (??$data_ptr@J@TensorBase@at@@QEBAPEAJXZ) build\lib.win-amd64-cpython-39\pytorch3d\_C.cp39-win_amd64.pyd : fatal error LNK1120: 2 unresolved externals error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX64\\x64\\link.exe' failed with exit code 1120

bottler commented 9 months ago

Sorry, this is a known problem. A user provided a fix in https://github.com/facebookresearch/pytorch3d/pull/1689/files a few days ago. The PR should get merged soon, but can you make the changes locally yourself in the meantime?

ItayCoifman commented 9 months ago

Thanks, that works for me :) Still, i can't pass all of the tests but for the moment this is enough

anleleaaa commented 8 months ago

My computer is still the same problem, really bad!!

正在创建库 E:\AI_hub\pytorch3d-main\build\temp.win-amd64-cpython-39\Release\AI_hub\pytorch3d-main\pytorch3d\csrc\ball_query_C.cp39-win_amd64.lib 和对象 E:\AI_hub\pytorch3d-main\build\temp.win-amd64-cpython-39\Release\AI_hub\pytorch3d-main\pytorch3d\csrc\ball_query_C.cp39-win_amd64.exp ball_query_cpu.obj : error LNK2001: 无法解析的外部符号 imp_tlsoffset?init@?1??lazy_init_num_threads@internal@at@@YAXXZ@4_NA ball_query_cpu.obj : error LNK2001: 无法解析的外部符号 imp_tlsindex?init@?1??lazy_init_num_threads@internal@at@@YAXXZ@4_NA build\lib.win-amd64-cpython-39\pytorch3d_C.cp39-win_amd64.pyd : fatal error LNK1120: 2 个无法解析的外部命令 error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\link.exe' failed with exit code 1120