pip install failed
lyldev opened this issue · 7 comments
Env: python 3.7.3
I have installed autowrap
and cython
manually with pip before I install py-go-icp
Console log out this:
> pip install py-goicp --user
Collecting py-goicp
Using cached py_goicp-0.0.4.tar.gz (40 kB)
ERROR: Command errored out with exit status 1:
command: 'P:\ProgramData\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-_4l8ku1p\\py-goicp\\setup.py'"'"'; __file__='"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-_4l8ku1p\\py-goicp\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\xxx\AppData\Local\Temp\pip-pip-egg-info-c5wxp7n3'
cwd: C:\Users\xxx\AppData\Local\Temp\pip-install-_4l8ku1p\py-goicp\
Complete output (71 lines):
Level 25:root:parsing progress 0 out of 1
INFO:root:start resolving decls
INFO:root:resolve_inheritance for POINT3D
INFO:root:resolve_inheritance for ROTNODE
INFO:root:resolve_inheritance for TRANSNODE
INFO:root:resolve_inheritance for GoICP
INFO:root:resolve class decl POINT3D
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void POINT3D ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void POINT3D (['float ', 'float ', 'float '])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void pointToString ([])'
INFO:root:resolve class decl ROTNODE
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void ROTNODE ([])'
INFO:root:resolve class decl TRANSNODE
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void TRANSNODE ([])'
INFO:root:resolve class decl GoICP
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void GoICP ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: float Register ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void BuildDT ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: libcpp_vector[libcpp_vector[double]] optimalRotation ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: libcpp_vector[double] optimalTranslation ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void loadModelAndData (['int ', 'libcpp_vector[POINT3D] ', 'int ', 'libcpp_vector[POINT3D] '])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void setInitNodeRot (['ROTNODE & '])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void setInitNodeTrans (['TRANSNODE & '])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void setDTSizeAndFactor (['int ', 'double '])'
INFO:root:register <autowrap.ConversionProvider.IntegerConverter object at 0x00000187723A07F0>
INFO:root:register <autowrap.ConversionProvider.FloatConverter object at 0x00000187722A9860>
INFO:root:register <autowrap.ConversionProvider.DoubleConverter object at 0x00000187723915C0>
INFO:root:register <autowrap.ConversionProvider.ConstCharPtrConverter object at 0x00000187723AAA90>
INFO:root:register <autowrap.ConversionProvider.CharPtrConverter object at 0x00000187723AAAC8>
INFO:root:register <autowrap.ConversionProvider.CharConverter object at 0x00000187723AAB00>
INFO:root:register <autowrap.ConversionProvider.StdStringConverter object at 0x00000187723AAB38>
INFO:root:register <autowrap.ConversionProvider.StdStringUnicodeConverter object at 0x00000187723AAB70>
INFO:root:register <autowrap.ConversionProvider.StdStringUnicodeOutputConverter object at 0x00000187723AABA8>
INFO:root:register <autowrap.ConversionProvider.StdVectorConverter object at 0x00000187723AABE0>
INFO:root:register <autowrap.ConversionProvider.StdSetConverter object at 0x00000187723AAC18>
INFO:root:register <autowrap.ConversionProvider.StdMapConverter object at 0x00000187723AAC50>
INFO:root:register <autowrap.ConversionProvider.StdPairConverter object at 0x00000187723AAC88>
INFO:root:register <autowrap.ConversionProvider.VoidConverter object at 0x00000187723AACC0>
INFO:root:register <autowrap.ConversionProvider.SharedPtrConverter object at 0x00000187723AACF8>
INFO:root:register <autowrap.ConversionProvider.TypeToWrapConverter object at 0x00000187723AAD68>
INFO:root:register <autowrap.ConversionProvider.TypeToWrapConverter object at 0x00000187723AA8D0>
INFO:root:register <autowrap.ConversionProvider.TypeToWrapConverter object at 0x00000187723AADD8>
INFO:root:register <autowrap.ConversionProvider.TypeToWrapConverter object at 0x00000187723AAE10>
INFO:root:Create foreign imports for module C:\Users\xxx\AppData\Local\Temp\pip-install-_4l8ku1p\py-goicp\src\py_goicp.pyx
INFO:root:create wrapper for class GoICP
INFO:root: create wrapper for non overloaded constructor __init__
INFO:root: create wrapper for Register ('float Register()')
INFO:root: create wrapper for BuildDT ('void BuildDT()')
INFO:root: create wrapper for optimalRotation ('libcpp_vector[libcpp_vector[double]] optimalRotation()')
INFO:root: create wrapper for optimalTranslation ('libcpp_vector[double] optimalTranslation()')
INFO:root: create wrapper for loadModelAndData ('void loadModelAndData(int, libcpp_vector[POINT3D], int, libcpp_vector[POINT3D])')
INFO:root: create wrapper for setInitNodeRot ('void setInitNodeRot(ROTNODE &)')
INFO:root: create wrapper for setInitNodeTrans ('void setInitNodeTrans(TRANSNODE &)')
INFO:root: create wrapper for setDTSizeAndFactor ('void setDTSizeAndFactor(int, double)')
INFO:root:create wrapper for class POINT3D
INFO:root: create wrapper for non overloaded constructor _init_0
INFO:root: create wrapper for non overloaded constructor _init_1
INFO:root: create wrapper decl for overloaded method __init__
INFO:root: create wrapper for pointToString ('void pointToString()')
INFO:root:create wrapper for class ROTNODE
INFO:root: create wrapper for non overloaded constructor __init__
INFO:root:create wrapper for class TRANSNODE
INFO:root: create wrapper for non overloaded constructor __init__
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\xxx\AppData\Local\Temp\pip-install-_4l8ku1p\py-goicp\setup.py", line 66, in <module>
long_description=open('README.md').read(),
UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 3658: illegal multibyte sequence
FOUND AUTOWRAP LIBRARY, PROCEED
PRECOMPILE USING AUTOWRAP BEFORE PROCEEDING
Autowrap has wrapped 4 classes, 13 methods and 0 enums
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Looks like the library compiles fine. Rather this is an annoying but simple issue of text encoding error due to readme file in setup.py file. Perhaps you can download the repository and remove the long description field in setup.py and then try python setup.py build_ext
. This should compile successfully after which you can do python setup.py install
. Meanwhile I will try and fix the issue so it works over pip without issues. Let me know how it goes.
Regards,
#0K
@aalavandhaann Thanks for your review. I will try this solution.
@aalavandhaann
I cloned this repo and remove the long_description
field in setup.py, but when I try python setup.py build_ext
, this error occurred:
d:\codes\vscode\go-icp_cython\src\matrix.hpp(33): error C2371: “int8_t”: 重定义;不同的基类型(Redefinition; different base types)
modified setup.py (only remove long_description
field) :
setup(cmdclass={'build_ext':build_ext},
name="py_goicp",
version="%d.%d.%d" % VERSION,
ext_modules = [ext],
install_requires=['autowrap>=0.22'],
author='#0K Srinivasan Ramachandran',
author_email='ashok.srinivasan2002@gmail.com',
url='https://github.com/aalavandhaann/go-icp_cython',
maintainer="#0K Srinivasan Ramachandran",
maintainer_email="ashok.srinivasan2002@gmail.com",
platforms=["any"],
description='GO-ICP compiled using Cython to use in python',
license='LICENSE.txt',
keywords='icp go-icp registration alignment rigid-align rigid-alignment',
python_requires='>=2',
long_description_content_type='text/markdown',
# long_description=open('README.md').read(),
zip_safe=False,
)
Complete console output:
❯ python setup.py build_ext
FOUND AUTOWRAP LIBRARY, PROCEED
PRECOMPILE USING AUTOWRAP BEFORE PROCEEDING
Level 25:root:parsing progress 0 out of 1
INFO:root:start resolving decls
INFO:root:resolve_inheritance for POINT3D
INFO:root:resolve_inheritance for ROTNODE
INFO:root:resolve_inheritance for TRANSNODE
INFO:root:resolve_inheritance for GoICP
INFO:root:resolve class decl POINT3D
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void POINT3D ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void POINT3D (['float ', 'float ', 'float '])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void pointToString ([])'
INFO:root:resolve class decl ROTNODE
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void ROTNODE ([])'
INFO:root:resolve class decl TRANSNODE
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void TRANSNODE ([])'
INFO:root:resolve class decl GoICP
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void GoICP ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: float Register ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void BuildDT ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: libcpp_vector[libcpp_vector[double]] optimalRotation ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: libcpp_vector[double] optimalTranslation ([])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void loadModelAndData (['int ', 'libcpp_vector[POINT3D] ', 'int ', 'libcpp_vector[POINT3D] '])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void setInitNodeRot (['ROTNODE & '])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void setInitNodeTrans (['TRANSNODE & '])'
INFO:root:resolve method decl: 'CppMethodOrFunctionDecl: void setDTSizeAndFactor (['int ', 'double '])'
INFO:root:register <autowrap.ConversionProvider.IntegerConverter object at 0x000002F1A40A3400>
INFO:root:register <autowrap.ConversionProvider.FloatConverter object at 0x000002F1A4099128>
INFO:root:register <autowrap.ConversionProvider.DoubleConverter object at 0x000002F1A4061588>
INFO:root:register <autowrap.ConversionProvider.ConstCharPtrConverter object at 0x000002F1A40B36A0>
INFO:root:register <autowrap.ConversionProvider.CharPtrConverter object at 0x000002F1A40B36D8>
INFO:root:register <autowrap.ConversionProvider.CharConverter object at 0x000002F1A40B3710>
INFO:root:register <autowrap.ConversionProvider.StdStringConverter object at 0x000002F1A40B3748>
INFO:root:register <autowrap.ConversionProvider.StdStringUnicodeConverter object at 0x000002F1A40B3780>
INFO:root:register <autowrap.ConversionProvider.StdStringUnicodeOutputConverter object at 0x000002F1A40B37B8>
INFO:root:register <autowrap.ConversionProvider.StdVectorConverter object at 0x000002F1A40B37F0>
INFO:root:register <autowrap.ConversionProvider.StdSetConverter object at 0x000002F1A40B3828>
INFO:root:register <autowrap.ConversionProvider.StdMapConverter object at 0x000002F1A40B3860>
INFO:root:register <autowrap.ConversionProvider.StdPairConverter object at 0x000002F1A40B3898>
INFO:root:register <autowrap.ConversionProvider.VoidConverter object at 0x000002F1A40B38D0>
INFO:root:register <autowrap.ConversionProvider.SharedPtrConverter object at 0x000002F1A40B3908>
INFO:root:register <autowrap.ConversionProvider.TypeToWrapConverter object at 0x000002F1A40B3978>
INFO:root:register <autowrap.ConversionProvider.TypeToWrapConverter object at 0x000002F1A40B34E0>
INFO:root:register <autowrap.ConversionProvider.TypeToWrapConverter object at 0x000002F1A40B39E8>
INFO:root:register <autowrap.ConversionProvider.TypeToWrapConverter object at 0x000002F1A40B3A20>
INFO:root:Create foreign imports for module D:\Codes\VSCode\go-icp_cython\src\py_goicp.pyx
INFO:root:create wrapper for class GoICP
INFO:root: create wrapper for non overloaded constructor __init__
INFO:root: create wrapper for Register ('float Register()')
INFO:root: create wrapper for BuildDT ('void BuildDT()')
INFO:root: create wrapper for optimalRotation ('libcpp_vector[libcpp_vector[double]] optimalRotation()')
INFO:root: create wrapper for optimalTranslation ('libcpp_vector[double] optimalTranslation()')
INFO:root: create wrapper for loadModelAndData ('void loadModelAndData(int, libcpp_vector[POINT3D], int, libcpp_vector[POINT3D])')
INFO:root: create wrapper for setInitNodeRot ('void setInitNodeRot(ROTNODE &)')
INFO:root: create wrapper for setInitNodeTrans ('void setInitNodeTrans(TRANSNODE &)')
INFO:root: create wrapper for setDTSizeAndFactor ('void setDTSizeAndFactor(int, double)')
INFO:root:create wrapper for class POINT3D
INFO:root: create wrapper for non overloaded constructor _init_0
INFO:root: create wrapper for non overloaded constructor _init_1
INFO:root: create wrapper decl for overloaded method __init__
INFO:root: create wrapper for pointToString ('void pointToString()')
INFO:root:create wrapper for class ROTNODE
INFO:root: create wrapper for non overloaded constructor __init__
INFO:root:create wrapper for class TRANSNODE
INFO:root: create wrapper for non overloaded constructor __init__
Autowrap has wrapped 4 classes, 13 methods and 0 enums
running build_ext
building 'py_goicp' extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3
/GL /DNDEBUG /MD -IP:\ProgramData\Anaconda3\lib\site-packages\autowrap\data_files\autowrap -IP:\ProgramData\Anaconda3\lib\site-packages\autowrap\data_files -IP:\ProgramData\Anaconda3\include -IP:\ProgramData\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tpsrc/py_goicp.cpp /Fobuild\temp.win-amd64-3.7\Release\src/py_goicp.obj -std=c++14
cl: 命令行 warning D9002 :忽略未知选项“-std=c++14”
py_goicp.cpp
d:\codes\vscode\go-icp_cython\src\matrix.hpp(33): error C2371: “int8_t”: 重定义;不同的基类型
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\stdint.h(17): note: 参见“int8_t”的
声明
d:\codes\vscode\go-icp_cython\src\matrix.hpp(251): warning C4267: “参数”: 从“size_t”转换到“const int32_t”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(175): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(188): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(202): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(213): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(218): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(253): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(264): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(298): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(310): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(323): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(334): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(339): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(375): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(386): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(423): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(436): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(449): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(462): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(475): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(488): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(501): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(514): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(527): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(546): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(559): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(572): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(583): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(589): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(628): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(640): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(653): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(665): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(677): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(689): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(701): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(713): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(725): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(747): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(761): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(776): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(788): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(794): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(1075): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(1096): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(1101): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(1107): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(1112): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(1118): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(1123): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_3ddt.hpp(1127): warning C4244: “return”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(202): warning C4305: “=”: 从“double”到“float”截断
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(203): warning C4305: “=”: 从“double”到“float”截断
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(204): warning C4305: “=”: 从“double”到“float”截断
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(205): warning C4305: “=”: 从“double”到“float”截断
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(209): warning C4305: “=”: 从“double”到“float”截断
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(294): warning C4244: “=”: 从“FLOAT”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(295): warning C4244: “=”: 从“FLOAT”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(296): warning C4244: “=”: 从“FLOAT”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(342): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(343): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(346): warning C4305: “=”: 从“double”到“float”截断
d:\codes\vscode\go-icp_cython\src\jly_goicp.hpp(450): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
Okay. I will try on my machine on windows 10(believe it's the one you are using) and will let you know. Regards, #0K
…
On Fri, Jun 5, 2020, 8:32 AM lyldev @.***> wrote: I cloned this repo and remove the long_description field in setup.py, but when I try python setup.py build_ext this error occurred: d:\codes\vscode\go-icp_cython\src\matrix.hpp(33): error C2371: “int8_t”: 重定义;不同的基类型(Redefinition; different base types) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6JJV33GBGM6V6NEVRDMNTRVDQVPANCNFSM4NTGBHWA .
Yes, Win10 64bit.
Looks like msvc is complaining about redefinition of int8_t and other types followed. You should be able to solve this using the given solution (ugly but works). The difference is tiny but you should be able to sucessfully do a python setup.py build_ext
.
Do the following in the files
setup.py
change line number 66 to
long_description=open('README.md', encoding='utf-8').read(),
matrix.hpp
line numbers 33-36
change from
typedef __int8 int8_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;
TO
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef signed __int64 int64_t;
The above changes in the two files should fix the issues. Let me know if you still have any trouble.
Regards,
#0K
Thanks a lot. This solution works. I have installed it successfully.