You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When run pip install sentencepiece in python 3.6.1, I got this error:
building '_sentencepiece' extension
creating build/temp.linux-x86_64-3.6
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/yuchang/miniconda3/include/python3.6m -c sentencepiece_wrap.cxx -o build/temp.linux-x86_64-3.6/sentencepiece_wrap.o -std=c++11 -g -O2 -I/usr/local/include
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
sentencepiece_wrap.cxx: In function ‘PyObject* _wrap_SentencePieceProcessor_Load(PyObject*, PyObject*)’:
sentencepiece_wrap.cxx:3305:53: error: ‘PyString_AsStringAndSize’ was not declared in this scope
PyString_AsStringAndSize(obj1, &str, &str_size);
^
sentencepiece_wrap.cxx: In function ‘PyObject* _wrap_SentencePieceProcessor_LoadOrDie(PyObject*, PyObject*)’:
sentencepiece_wrap.cxx:3347:53: error: ‘PyString_AsStringAndSize’ was not declared in this scope
PyString_AsStringAndSize(obj1, &str, &str_size);
^
I googled the "PyString_AsStringAndSize", some one said that it means the code does not support python3 , so I change the python version to 2.7.12, then I got:
Collecting sentencepiece
Using cached sentencepiece-0.0.0.tar.gz
Complete output from command python setup.py egg_info:
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
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-joX_PJ/sentencepiece/setup.py", line 28, in <module>
cmd('pkg-config sentencepiece --cflags'),
File "/tmp/pip-build-joX_PJ/sentencepiece/setup.py", line 14, in cmd
return os.popen(line).readlines()[0][:-1].split()
IndexError: list index out of range
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-joX_PJ/sentencepiece/
My OS is Ubuntu 16.04, python 3.6.1 installed by miniconda3 , python 2.7.12 installed with system.
Any advise or guidance would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
My friend setup the python wrapper on Ubuntu 16.04 and python 2.7.12 successfully, so, it is certainly something wrong with my machine. But it is really wired.
Anyway, I should close this issue now, sorry to bother you.
When run
pip install sentencepiece
in python 3.6.1, I got this error:I googled the "PyString_AsStringAndSize", some one said that it means the code does not support python3 , so I change the python version to 2.7.12, then I got:
My OS is Ubuntu 16.04, python 3.6.1 installed by miniconda3 , python 2.7.12 installed with system.
Any advise or guidance would be greatly appreciated.
The text was updated successfully, but these errors were encountered: