Trying to install the cld2-cffi module within Python 3.4 on Windows 7 x64 fails on my desktop machine.
I've tried repairing and restarting Visual Studio 2015, and running vcvarsall.bat again, but no luck. Unfortunately, this module is not on Christophe Gohlke's list of compled .whl files.
Here's the error message:
Installing 'cld2-cffi' -----
Collecting cld2-cffi
Using cached cld2-cffi-0.1.4.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info\cld2_cffi.egg-info
writing dependency_links to pip-egg-info\cld2_cffi.egg-info\dependency_links.txt
writing pip-egg-info\cld2_cffi.egg-info\PKG-INFO
writing requirements to pip-egg-info\cld2_cffi.egg-info\requires.txt
writing top-level names to pip-egg-info\cld2_cffi.egg-info\top_level.txt
writing manifest file 'pip-egg-info\cld2_cffi.egg-info\SOURCES.txt'
_cffi__x21af333bx25bdf976.c
encoding_lut.cc
binding.cc
cld2\binding.cc(165) : warning C4018: '<' : signed/unsigned mismatch
cldutil.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
cldutil_shared.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
compact_lang_det.cc
compact_lang_det_hint_code.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
cld2\internal\compact_lang_det_hint_code.cc(1450) : warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\string.h(188) : see declaration of 'strncpy'
cld2\internal\compact_lang_det_hint_code.cc(1516) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\stdio.h(371) : see declaration of 'sprintf'
compact_lang_det_impl.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
cld2\internal\compact_lang_det_impl.cc(2117) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\stdio.h(371) : see declaration of 'sprintf'
debug.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
cld2\internal\debug.cc(92) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\stdio.h(371) : see declaration of 'sprintf'
cld2\internal\debug.cc(255) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\stdio.h(371) : see declaration of 'sprintf'
cld2\internal\debug.cc(264) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\stdio.h(371) : see declaration of 'sprintf'
fixunicodevalue.cc
generated_entities.cc
generated_language.cc
generated_ulscript.cc
getonescriptspan.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
cld2\internal\getonescriptspan.cc(473) : warning C4800: 'const char' : forcing value to bool 'true' or 'false' (performance warning)
lang_script.cc
offsetmap.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
cld2\internal\offsetmap.cc(73) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\stdio.h(234) : see declaration of 'fopen'
scoreonescriptspan.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
tote.cc
utf8statetable.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
cld2\internal\utf8statetable.cc(288) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
cld2\internal\utf8statetable.cc(382) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
cld2\internal\utf8statetable.cc(472) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
cld_generated_cjk_uni_prop_80.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
cld2_generated_cjk_compatible.cc
cld_generated_cjk_delta_bi_32.cc
generated_distinct_bi_0.cc
cld2_generated_quad0122.cc
cld2_generated_deltaocta0122.cc
cld2_generated_distinctocta0122.cc
cld_generated_score_quad_octa_0122.cc
LINK : fatal error LNK1104: cannot open file 'msvcprt.lib'
Traceback (most recent call last):
File "C:\Python34\lib\distutils\msvc9compiler.py", line 639, in link
self.spawn([self.linker] + ld_args)
File "C:\Python34\lib\distutils\ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "C:\Python34\lib\distutils\spawn.py", line 38, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
File "C:\Python34\lib\distutils\spawn.py", line 81, in _spawn_nt
"command %r failed with exit status %d" % (cmd, rc))
distutils.errors.DistutilsExecError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Bin\\link.exe' failed with exit status 1104
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\cffi\ffiplatform.py", line 58, in _build
dist.run_command('build_ext')
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\build_ext.py", line 75, in run
_build_ext.run(self)
File "C:\Python34\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Python34\lib\distutils\command\build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "C:\Python34\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Python34\lib\distutils\command\build_ext.py", line 535, in build_extension
target_lang=language)
File "C:\Python34\lib\distutils\ccompiler.py", line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 641, in link
raise LinkError(msg)
distutils.errors.LinkError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Bin\\link.exe' failed with exit status 1104
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\user\AppData\Local\Temp\pip-build-xet8gtog\cld2-cffi\setup.py", line 191, in <module>
'Topic :: Text Processing :: Linguistic'
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\egg_info.py", line 279, in run
self.find_sources()
File "C:\Python34\lib\site-packages\setuptools\command\egg_info.py", line 294, in find_sources
mm.run()
File "C:\Python34\lib\site-packages\setuptools\command\egg_info.py", line 525, in run
self.add_defaults()
File "C:\Python34\lib\site-packages\setuptools\command\egg_info.py", line 561, in add_defaults
sdist.add_defaults(self)
File "C:\Python34\lib\site-packages\setuptools\command\py36compat.py", line 34, in add_defaults
self._add_defaults_python()
File "C:\Python34\lib\site-packages\setuptools\command\sdist.py", line 133, in _add_defaults_python
build_py = self.get_finalized_command('build_py')
File "C:\Python34\lib\distutils\cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "C:\Python34\lib\distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "C:\Python34\lib\site-packages\setuptools\command\build_py.py", line 34, in finalize_options
orig.build_py.finalize_options(self)
File "C:\Python34\lib\distutils\command\build_py.py", line 45, in finalize_options
('force', 'force'))
File "C:\Python34\lib\distutils\cmd.py", line 287, in set_undefined_options
src_cmd_obj.ensure_finalized()
File "C:\Python34\lib\distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "C:\Users\user\AppData\Local\Temp\pip-build-xet8gtog\cld2-cffi\setup.py", line 143, in finalize_options
self.distribution.ext_modules = get_ext_modules()
File "C:\Users\user\AppData\Local\Temp\pip-build-xet8gtog\cld2-cffi\setup.py", line 128, in get_ext_modules
import cld2
File "C:\Users\user\AppData\Local\Temp\pip-build-xet8gtog\cld2-cffi\cld2\__init__.py", line 190, in <module>
extra_compile_args=_COMPILER_ARGS)
File "C:\Python34\lib\site-packages\cffi\api.py", line 437, in verify
lib = self.verifier.load_library()
File "C:\Python34\lib\site-packages\cffi\verifier.py", line 113, in load_library
self._compile_module()
File "C:\Python34\lib\site-packages\cffi\verifier.py", line 210, in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
File "C:\Python34\lib\site-packages\cffi\ffiplatform.py", line 29, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "C:\Python34\lib\site-packages\cffi\ffiplatform.py", line 65, in _build
raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.ffiplatform.VerificationError: LinkError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Bin\\link.exe' failed with exit status 1104
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-build-xet8gtog\cld2-cffi\
----- Failed to install 'cld2-cffi' -----
Thanks in advance.