← All tasks
pythongoogle/sentencepiece #111Not a task: not reproduced

Problems installing Python bindings on Mac

envgap__google__sentencepiece-111

01 / FAILURE SIGNATURE

As reported upstream

/Users/neubig/usr/include/sentencepiece_processor.h:141:8: error: no template named 'unique_ptr' in namespace 'std'
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
cff66162c3b7d5c4b0d0566cb951c4af59abd1c0
Manifest
python/setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

google/sentencepiece #111 · read the original issue
Hello! I'm having some trouble installing the Python bindings on Mac OS, and just thought I'd mention it here in case anyone had similar trouble. This is within an Anaconda environment, Python 3.



Move into directory and install:



    $ cd /path/to/sentencepiece

    $ ./autogen.sh

    $ ./configure

    $ make

    $ make install



Success. Try to install Python bindings:



    $ python setup.py build

    Package sentencepiece was not found in the pkg-config search path.

    Perhaps you should add the directory containing `sentencepiece.pc'

    to the PKG_CONFIG_PATH environment variable

    No package 'sentencepiece' found

    Failed to find sentencepiece pkgconfig



Fix the path.



    $ export PKG_CONFIG_PATH=`pwd`/..



And try again:



    $ python setup.py build

    running build

    running build_py

    running build_ext

    building '_sentencepiece' extension

    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/python3/include -arch x86_64 -I/anaconda3/envs/python3/include -arch x86_64 -I/anaconda3/envs/python3/include/python3.6m -c sentencepiece_wrap.cxx -o build/temp.macosx-10.7-x86_64-3.6/sentencepiece_wrap.o -std=c++11 -g -O2 -I/Users/neubig/usr/include

    In file included from sentencepiece_wrap.cxx:3124:

    /Users/neubig/usr/include/sentencepiece_processor.h:141:8: error: no template named 'unique_ptr' in namespace 'std'

      std::unique_ptr<Rep> rep_;

      ~~~~~^

    /Users/neubig/usr/include/sentencepiece_processor.h:181:8: error: no template named 'unique_ptr' in namespace 'std'

      std::unique_ptr<std::string> rep_;

      ~~~~~^    

    ...



The strange thing is that when I run the command on its own by copy-pasting things seem to work.



    $ gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/python3/include -arch x86_64 -I/anaconda3/envs/python3/include -arch x86_64 -I/anaconda3/envs/python3/include/python3.6m -c sentencepiece_wrap.cxx -o build/temp.macosx-10.7-x86_64-3.6/sentencepiece_wrap.o -std=c++11 -g -O2 -I/Users/neubig/usr/include



I'm not sure what would lead to the difference, but I'm stuck here...
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]