Python 平面散列映射。h:错误C3203:&x27;模板迭代器';:非专用类模板

Python 平面散列映射。h:错误C3203:&x27;模板迭代器';:非专用类模板,python,c++,pytorch,build-tools,Python,C++,Pytorch,Build Tools,我已尝试构建,但出现以下错误: /torch/include\c10/util/order_preserving_flat_hash_map.h(1499): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type /torch/include\

我已尝试构建,但出现以下错误:

 /torch/include\c10/util/order_preserving_flat_hash_map.h(1499): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/order_preserving_flat_hash_map.h(1557): note: see reference to class template instantiation 'ska_ordered::order_preserving_flat_hash_map<K,V,H,E,A>' being compiled
 /torch/include\c10/util/order_preserving_flat_hash_map.h(1503): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/order_preserving_flat_hash_map.h(1511): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/order_preserving_flat_hash_map.h(1593): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/order_preserving_flat_hash_map.h(1630): note: see reference to class template instantiation 'ska_ordered::flat_hash_set<T,H,E,A>' being compiled
 /torch/include\c10/util/order_preserving_flat_hash_map.h(1598): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/order_preserving_flat_hash_map.h(1602): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/order_preserving_flat_hash_map.h(1606): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/order_preserving_flat_hash_map.h(1610): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/flat_hash_map.h(1380): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/flat_hash_map.h(1438): note: see reference to class template instantiation 'ska::flat_hash_map<K,V,H,E,A>' being compiled
 /torch/include\c10/util/flat_hash_map.h(1384): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/flat_hash_map.h(1392): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/flat_hash_map.h(1474): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/flat_hash_map.h(1511): note: see reference to class template instantiation 'ska::flat_hash_set<T,H,E,A>' being compiled
 /torch/include\c10/util/flat_hash_map.h(1479): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/flat_hash_map.h(1483): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/flat_hash_map.h(1487): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
 /torch/include\c10/util/flat_hash_map.h(1491): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type
我想原因可能是我的visual studio版本是VS 2015,但我也安装了VS 2019,但我不知道如何强制python
setuptools
使用VS2019,它默认使用VS2015


谢谢。

因为我认为问题出在我的编译器版本上,我通过以下方法解决了:

首先,我在命令提示符下运行以下命令:

SET MSSdk=1
SET DISTUTILS_USE_SDK=1
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" amd64 8.1 -vcvars_ver=14.23
然后我成功地建造了它

SET MSSdk=1
SET DISTUTILS_USE_SDK=1
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" amd64 8.1 -vcvars_ver=14.23