pip install mojimoji failed

症状:

 pip install mojimoji
Downloading/unpacking mojimoji
  Downloading mojimoji-0.0.4.tar.gz
  Running setup.py (path:c:\users\**secret**\mojimoji\setup.py) egg_info for package mojimoji

Installing collected packages: mojimoji
  Running setup.py install for mojimoji
    building 'mojimoji' extension
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tpmojimoji.cpp /Fobuild\temp.win32-2.7\Release\mojimoji.obj
     mojimoji.cpp
    mojimoji.cpp(345) : fatal error C1083: include ファイルを開けません。'tr1/unordered_map': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2
    Complete output from command C:\Python27\python.exe -c "import setuptools, t
okenize;__file__='c:\\users\\**secret**\\mojimoji\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\**secret**\appdata\local\temp\pip-mrk9ml-record\install-record.txt --single-
version-externally-managed --compile:
    running install

running build

running build_ext

building 'mojimoji' extension

creating build

creating build\temp.win32-2.7

creating build\temp.win32-2.7\Release

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tpmojimoji.cpp /F obuild\temp.win32-2.7\Release\mojimoji.obj

mojimoji.cpp

mojimoji.cpp(345) : fatal error C1083: include ファイルを開けません。'tr1/unordered_map': No such file or directory

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2

----------------------------------------
Cleaning up...
Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\**secret**\\mojimoji\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\**secret**\appdata\local\temp\pip-mrk9ml-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\**secret**\mojimoji
Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\pip.exe\__main__.py", line 9, in <module>
  File "C:\Python27\lib\site-packages\pip\__init__.py", line 185, in main
    return command.main(cmd_args)
  File "C:\Python27\lib\site-packages\pip\basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 51: ordinal
 not in range(128)

対処 :

git clone https://github.com/studio-ousia/mojimoji
--- a/mojimoji.cpp
+++ b/mojimoji.cpp
@@ -342,7 +342,7 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define __PYX_HAVE_API__mojimoji
 #include "string.h"
 #include "stdlib.h"
-#include <tr1/unordered_map>
+#include <unordered_map>
 #ifdef _OPENMP
 #include <omp.h>
 #endif /* _OPENMP */

       python setup.py install

        

コメント

このブログの人気の投稿

Windows Server 2008 R2 & PHP 5.6(64bit)