0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac OS X Mojaveでmojimojiをpip installしてもgit cloneしてsetupしてもgccエラーで落ちるので諦めた

Last updated at Posted at 2019-08-01

結論

  • 未解決
  • 諦めてDocker化しよう

環境

  • OS: Mac OS X 10.14.4
  • Command Line Tools: 10.2.1.0.1.1554506761
  • python: 3.7.2
  • pyenv 1.2.9
  • Anaconda: anaconda3-5.3.1
  • gcc
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
  • g++
$ g++ -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

試したこととエラー

$ pip3 install mojimoji
Collecting mojimoji
  Using cached https://files.pythonhosted.org/packages/10/2d/f5d58e74af1c1b4eeea66ecc14f35ae8f275f39bc7158ba51a6e8a86dfdf/mojimoji-0.0.9.post0.tar.gz
Building wheels for collected packages: mojimoji
  Building wheel for mojimoji (setup.py) ... error                                                                                                         ERROR: Complete output from command /Users/hoge/.pyenv/versions/anaconda3-5.3.1/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/f1/4yw5ndq16g948z6p_htshlq80000gn/T/pip-install-fe09cwt4/mojimoji/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.rea
d().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/f1/4yw5ndq16g948z6p_htshlq80000gn/T/pip-wheel-ys3yrjwj --python-tag cp37:
  ERROR: running bdist_wheel
  running build
  running build_ext
  building 'mojimoji' extension
  creating build
  creating build/temp.macosx-10.7-x86_64-3.7
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/hoge/.pyenv/versions/anaconda3-5.3.1/include -arch x86_64 -I/Users/hoge/.pyenv/versions/anaconda3-5.3.1/include -arch x86_64 -I/Users/hoge/.pyenv/versions/anaconda3-5.3.1/include/python3.7m -c mojimoji.cpp -o build/temp.macosx-10.7-x86_64-3.7/mojimoji.o -std=c++11                                                                            warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
  mojimoji.cpp:581:10: fatal error: 'ios' file not found
  #include "ios"
           ^~~~~
  1 warning and 1 error generated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for mojimoji
  Running setup.py clean for mojimoji
Failed to build mojimoji
Installing collected packages: mojimoji
  Running setup.py install for mojimoji ... error
    ERROR: Complete output from command /Users/hoge/.pyenv/versions/anaconda3-5.3.1/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/f1/4yw5ndq16g948z6p_htshlq80000gn/T/pip-install-fe09cwt4/mojimoji/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/f1/4yw5ndq16g948z6p_htshlq80000gn/T/pip-record-c4m_edxq/install-record.txt --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_ext
    building 'mojimoji' extension
    creating build
    creating build/temp.macosx-10.7-x86_64-3.7
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/hoge/.pyenv/versions/anaconda3-5.3.1/include -arch x86_64 -I/Users/hoge/.pyenv/versions/anaconda3-5.3.1/include -arch x86_64 -I/Users/hoge/.pyenv/versions/anaconda3-5.3.1/include/python3.7m -c mojimoji.cpp -o build/temp.macosx-10.7-x86_64-3.7/mojimoji.o -std=c++11
    warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    mojimoji.cpp:581:10: fatal error: 'ios' file not found
    #include "ios"
             ^~~~~
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/Users/hoge/.pyenv/versions/anaconda3-5.3.1/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/f1/4yw5ndq16g948z6p_htshlq80000gn/T/pip-install-fe09cwt4/mojimoji/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/f1/4yw5ndq16g948z6p_htshlq80000gn/T/pip-record-c4m_edxq/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/f1/4yw5ndq16g948z6p_htshlq80000gn/T/pip-install-fe09cwt4/mojimoji/
  • ぐぐったらこちらのサイトがめっちゃ引用されてるので従ってみる
$ git clone https://github.com/studio-ousia/mojimoji
$ cd mojimoji
$ python3 setup.py install
running install
running bdist_egg
running egg_info
creating mojimoji.egg-info
writing mojimoji.egg-info/PKG-INFO
writing dependency_links to mojimoji.egg-info/dependency_links.txt
writing top-level names to mojimoji.egg-info/top_level.txt
writing manifest file 'mojimoji.egg-info/SOURCES.txt'
reading manifest file 'mojimoji.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'mojimoji.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.7-x86_64/egg
running install_lib
running build_ext
building 'mojimoji' extension
creating build
creating build/temp.macosx-10.7-x86_64-3.7
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/hoge/.pyenv/versions/anaconda3-5.3.1/include -arch x86_64 -I/Users/hoge/.pyenv/versions/anaconda3-5.3.1/include -arch x86_64 -I/Users/hoge/.pyenv/versions/anaconda3-5.3.1/include/python3.7m -c mojimoji.cpp -o build/temp.macosx-10.7-x86_64-3.7/mojimoji.o -std=c++11
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead
      [-Wstdlibcxx-not-found]
mojimoji.cpp:581:10: fatal error: 'ios' file not found
# include "ios"
         ^~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1

無理卍

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?