apex icon indicating copy to clipboard operation
apex copied to clipboard

error: legacy-install-failure

Open joeyslv opened this issue 2 years ago • 4 comments

(swin-t) C:\Users\joeyslv\apex>pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" . WARNING: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option. Using pip 22.0.4 from D:\App\anaconda\envs\swin-t\lib\site-packages\pip (python 3.7) Processing c:\users\joeyslv\apex Preparing metadata (setup.py) ... Running command python setup.py egg_info

torch.version = 1.9.0+cu111

running egg_info creating C:\Users\joeyslv\AppData\Local\Temp\pip-pip-egg-info-48wsf7jt\apex.egg-info writing C:\Users\joeyslv\AppData\Local\Temp\pip-pip-egg-info-48wsf7jt\apex.egg-info\PKG-INFO writing dependency_links to C:\Users\joeyslv\AppData\Local\Temp\pip-pip-egg-info-48wsf7jt\apex.egg-info\dependency_links.txt writing top-level names to C:\Users\joeyslv\AppData\Local\Temp\pip-pip-egg-info-48wsf7jt\apex.egg-info\top_level.txt writing manifest file 'C:\Users\joeyslv\AppData\Local\Temp\pip-pip-egg-info-48wsf7jt\apex.egg-info\SOURCES.txt' reading manifest file 'C:\Users\joeyslv\AppData\Local\Temp\pip-pip-egg-info-48wsf7jt\apex.egg-info\SOURCES.txt' adding license file 'LICENSE' writing manifest file 'C:\Users\joeyslv\AppData\Local\Temp\pip-pip-egg-info-48wsf7jt\apex.egg-info\SOURCES.txt' C:\Users\joeyslv\apex\setup.py:109: UserWarning: Option --pyprof not specified. Not installing PyProf dependencies! warnings.warn("Option --pyprof not specified. Not installing PyProf dependencies!") Error in atexit._run_exitfuncs: Traceback (most recent call last): File "D:\App\anaconda\envs\swin-t\lib\site-packages\colorama\ansitowin32.py", line 59, in closed return stream.closed ValueError: underlying buffer has been detached done Skipping wheel build for apex, due to binaries being disabled for it. Installing collected packages: apex Running setup.py install for apex ... Running command Running setup.py install for apex

torch.version = 1.9.0+cu111

C:\Users\joeyslv\apex\setup.py:109: UserWarning: Option --pyprof not specified. Not installing PyProf dependencies! warnings.warn("Option --pyprof not specified. Not installing PyProf dependencies!")

Compiling cuda extensions with nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2020 NVIDIA Corporation Built on Mon_Oct_12_20:54:10_Pacific_Daylight_Time_2020 Cuda compilation tools, release 11.1, V11.1.105 Build cuda_11.1.relgpu_drvr455TC455_06.29190527_0 from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1/bin

running install running build running build_py running build_ext D:\App\anaconda\envs\swin-t\lib\site-packages\torch\utils\cpp_extension.py:370: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) D:\App\anaconda\envs\swin-t\lib\site-packages\torch\utils\cpp_extension.py:305: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。 warnings.warn(f'Error checking compiler version for {compiler}: {error}') building 'amp_C' extension C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:\App\anaconda\envs\swin-t\lib\site-packages\torch\include -ID:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\torch\csrc\api\include -ID:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\TH -ID:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\include" -ID:\App\anaconda\envs\swin-t\include -ID:\App\anaconda\envs\swin-t\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tpcsrc/amp_C_frontend.cpp /Fobuild\temp.win-amd64-3.7\Release\csrc/amp_C_frontend.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -O3 -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 cl: 命令行 warning D9002 :忽略未知选项“-O3” amp_C_frontend.cpp D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=at::Tensor ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=at::Tensor ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=at::Tensor ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBaseat::Tensor”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/TensorBody.h(734): note: 查看对正在编译的 类 模 板 实例化“c10::optionalat::Tensor”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=at::Tensor ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=at::Generator ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=at::Generator ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=at::Generator ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBaseat::Generator”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/TensorBody.h(800): note: 查看对正在编译的 类 模 板 实例化“c10::optionalat::Generator”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=at::Generator ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBase<c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/core/impl/InlineDeviceGuard.h(427): note: 查看对正在编译的 类 模板 实例化“c10::optional<c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/core/DeviceGuard.h(178): note: 查看对正在编译的 类 模 板 实例化“c10::impl::InlineOptionalDeviceGuardc10::impl::VirtualGuardImpl”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::string ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=std::string ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=std::string ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBasestd::string”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/jit_type_base.h(107): note: 查看对正在编译的 类 模板 实例化“c10::optionalstd::string”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::string ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::vector<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=std::vector<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=std::vector<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBase<std::vector<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol>>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/jit_type.h(351): note: 查看对正在编译的 类 模板 实例化“c10::optional<std::vector<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol>>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::vector<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::vector<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=std::vector<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=std::vector<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBase<std::vector<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>>>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/jit_type.h(425): note: 查看对正在编译的 类 模板 实例化“c10::optional<std::vector<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>>>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/jit_type.h(664): note: 查看对正在编译的 类 模板 实例化“c10::VaryingShapec10::Stride”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::vector<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::vector<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=std::vector<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=std::vector<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBase<std::vector<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>>>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/jit_type.h(425): note: 查看对正在编译的 类 模板 实例化“c10::optional<std::vector<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>>>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/jit_type.h(470): note: 查看对正在编译的 类 模板 实例化“c10::VaryingShape<int64_t>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::vector<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::vector<int64_t,std::allocator<int64_t>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=std::vector<int64_t,std::allocator<int64_t>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=std::vector<int64_t,std::allocator<int64_t>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBase<std::vector<int64_t,std::allocator<int64_t>>>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/jit_type.h(568): note: 查看对正在编译的 类 模板 实例化“c10::optional<std::vector<int64_t,std::allocator<int64_t>>>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::vector<int64_t,std::allocator<int64_t>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::QualifiedName ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=c10::QualifiedName ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=c10::QualifiedName ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBasec10::QualifiedName”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/jit_type.h(903): note: 查看对正在编译的 类 模板 实例化“c10::optionalc10::QualifiedName”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::QualifiedName ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBase<c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/core/impl/InlineStreamGuard.h(196): note: 查看对正在编译的 类 模板 实例化“c10::optional<c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/core/StreamGuard.h(139): note: 查看对正在编译的 类 模 板 实例化“c10::impl::InlineOptionalStreamGuardc10::impl::VirtualGuardImpl”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=c10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=c10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBasec10::impl::VirtualGuardImpl”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/core/impl/InlineStreamGuard.h(231): note: 查看对正在编译的 类 模板 实例化“c10::optional<T>”的引用 with [ T=c10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/core/StreamGuard.h(162): note: 查看对正在编译的 类 模 板 实例化“c10::impl::InlineMultiStreamGuardc10::impl::VirtualGuardImpl”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::impl::VirtualGuardImpl ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::vector<std::reference_wrapper<const c10::DataPtr>,std::allocator<std::reference_wrapper<const c10::DataPtr>>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=std::vector<std::reference_wrapper<const c10::DataPtr>,std::allocator<std::reference_wrapper<const c10::DataPtr>>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=std::vector<std::reference_wrapper<const c10::DataPtr>,std::allocator<std::reference_wrapper<const c10::DataPtr>>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBase<std::vector<std::reference_wrapper<const c10::DataPtr>,std::allocator<std::reference_wrapper<const c10::DataPtr>>>>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/core/ivalue_inl.h(362): note: 查看对正在编译的 类 模 板 实例化“c10::optional<std::vector<std::reference_wrapper<const c10::DataPtr>,std::allocator<std::reference_wrapper<const c10::DataPtr>>>>”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=std::vector<std::reference_wrapper<const c10::DataPtr>,std::allocator<std::reference_wrapper<const c10::DataPtr>>> ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::OperatorName ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=c10::OperatorName ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=c10::OperatorName ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBasec10::OperatorName”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/record_function.h(306): note: 查看对正在编译的 类 模 板 实例化“c10::optionalc10::OperatorName”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::OperatorName ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=at::DimVector ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=at::DimVector ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=at::DimVector ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBaseat::DimVector”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\ATen/TensorIterator.h(616): note: 查看对正在编译的 类 模板 实例化“c10::optionalat::DimVector”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=at::DimVector ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=torch::autograd::ViewInfo ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(367): note: 查看对正在编译的 类 模板 实例化“c10::constexpr_storage_t<T>”的引用 with [ T=torch::autograd::ViewInfo ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 类 模板 实例化“c10::trivially_copyable_optimization_optional_base<T>”的引用 with [ T=torch::autograd::ViewInfo ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(427): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBasetorch::autograd::ViewInfo”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\torch/csrc/autograd/variable.h(529): note: 查看对正在编译 的 类 模板 实例化“c10::optionaltorch::autograd::ViewInfo”的引用 D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: “c10::trivially_copyable_optimization_optional_base<T>”: 已将析构函数隐式定义为“已删除” with [ T=torch::autograd::ViewInfo ] D:\App\anaconda\envs\swin-t\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: “c10::constexpr_storage_t<T>”: 已将析构函数隐式定义为“已删除” with [ T=c10::IValue ] ..... ..... i delete some because its too many to submit

1 error detected in the compilation of "csrc/multi_tensor_scale_kernel.cu". multi_tensor_scale_kernel.cu error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin\nvcc.exe' failed with exit status 1 Error in atexit._run_exitfuncs: Traceback (most recent call last): File "D:\App\anaconda\envs\swin-t\lib\site-packages\colorama\ansitowin32.py", line 59, in closed return stream.closed ValueError: underlying buffer has been detached error: subprocess-exited-with-error

× Running setup.py install for apex did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. full command: 'D:\App\anaconda\envs\swin-t\python.exe' -u -c ' exec(compile('"'"''"'"''"'"'

This is -- a caller that pip uses to run setup.py

- It imports setuptools before invoking setup.py, to enable projects that directly

import from distutils.core to work with newer packaging standards.

- It provides a clear error message when setuptools is not installed.

- It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so

setuptools doesn'"'"'t think the script is -c. This avoids the following warning:

manifest_maker: standard file '"'"'-c'"'"' not found".

- It generates a shim setup.py, for handling setup.cfg-only projects.

import os, sys, tokenize

try: import setuptools except ImportError as error: print( "ERROR: Can not execute setup.py since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1)

file = %r sys.argv[0] = file

if os.path.exists(file): filename = file with tokenize.open(file) as f: setup_py_code = f.read() else: filename = "" setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'C:\Users\joeyslv\apex\setup.py'"'"',), "", "exec"))' --cpp_ext --cuda_ext install --record 'C:\Users\joeyslv\AppData\Local\Temp\pip-record-ucd3dnb7\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\App\anaconda\envs\swin-t\Include\apex' cwd: C:\Users\joeyslv\apex
error error: legacy-install-failure

× Encountered error while trying to install package. ╰─> apex

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

joeyslv avatar Mar 16 '22 04:03 joeyslv

Hi, I have met the same error, have you solved that?

yutongwangBIT avatar Apr 09 '22 03:04 yutongwangBIT

Hi, I have met the same error, have you solved that?

not yet , i give up

joeyslv avatar Apr 09 '22 14:04 joeyslv

Hi, I have met the same error, have you solved that?

not yet , i give up

well, for me the problem was that the torch version is not compatible with the Cuda version. As I have updated the torch version and reinstalled Apex, the error is not shown again. Hope useful for you too.

yutongwangBIT avatar Apr 11 '22 07:04 yutongwangBIT

Hi, I have met the same error, have you solved that?

not yet , i give up

well, for me the problem was that the torch version is not compatible with the Cuda version. As I have updated the torch version and reinstalled Apex, the error is not shown again. Hope useful for you too. I have already updated the torch version, but it does not work. Does the python version influence?

liang3588 avatar Aug 03 '22 01:08 liang3588