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
I tried to install pyfasttext from pip but had the following error:
styrke@laptop ~/code $ pip install pyfasttext
Collecting pyfasttext
Using cached pyfasttext-0.4.0.tar.gz
Complete output from command python setup.py egg_info:
Error compiling Cython file:
------------------------------------------------------------
...
from libcpp.map cimport map
from libcpp.set cimport set
from libcpp.utility cimport pair
from libcpp.queue cimport priority_queue
from cysignals.signals cimport sig_on, sig_off, sig_check
^
------------------------------------------------------------
src/pyfasttext.pyx:20:0: 'cysignals/signals.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from libcpp.map cimport map
from libcpp.set cimport set
from libcpp.utility cimport pair
from libcpp.queue cimport priority_queue
from cysignals.signals cimport sig_on, sig_off, sig_check
^
------------------------------------------------------------
src/pyfasttext.pyx:20:0: 'cysignals/signals/sig_on.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from libcpp.map cimport map
from libcpp.set cimport set
from libcpp.utility cimport pair
from libcpp.queue cimport priority_queue
from cysignals.signals cimport sig_on, sig_off, sig_check
^
------------------------------------------------------------
src/pyfasttext.pyx:20:0: 'cysignals/signals/sig_off.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from libcpp.map cimport map
from libcpp.set cimport set
from libcpp.utility cimport pair
from libcpp.queue cimport priority_queue
from cysignals.signals cimport sig_on, sig_off, sig_check
^
------------------------------------------------------------
src/pyfasttext.pyx:20:0: 'cysignals/signals/sig_check.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
dict = self.ft.getDictionary()
self.word_vectors = make_unique[Matrix](deref(dict).nwords(), self.ft.getDimension())
deref(self.word_vectors).zero()
for i in range(deref(dict).nwords()):
sig_check()
^
------------------------------------------------------------
src/pyfasttext.pyx:302:6: 'sig_check' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
query_norm = query_vec.norm()
if abs(query_norm) < 1e-8:
query_norm = 1.0
dict = self.ft.getDictionary()
for idx in range(deref(dict).nwords()):
sig_check()
^
------------------------------------------------------------
src/pyfasttext.pyx:346:6: 'sig_check' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
word = deref(dict).getWord(idx)
dp = deref(self.word_vectors).dotRow(query_vec, idx)
heap.push(pair[real, string](dp / query_norm, word))
while i < k and heap.size() > 0:
sig_check()
^
------------------------------------------------------------
src/pyfasttext.pyx:352:6: 'sig_check' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef shared_ptr[Args] s_args = make_shared[Args]()
deref(s_args).parseArgs(args)
try:
if command == 'quantize':
sig_on()
^
------------------------------------------------------------
src/pyfasttext.pyx:461:8: 'sig_on' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
deref(s_args).parseArgs(args)
try:
if command == 'quantize':
sig_on()
self.ft.quantize(s_args)
sig_off()
^
------------------------------------------------------------
src/pyfasttext.pyx:463:8: 'sig_off' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
if command == 'quantize':
sig_on()
self.ft.quantize(s_args)
sig_off()
else:
sig_on()
^
------------------------------------------------------------
src/pyfasttext.pyx:465:8: 'sig_on' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
self.ft.quantize(s_args)
sig_off()
else:
sig_on()
self.ft.train(s_args)
sig_off()
^
------------------------------------------------------------
src/pyfasttext.pyx:467:8: 'sig_off' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
predictions = []
for line in lines:
line = bytes(line, self.encoding)
deref(iss).str(line)
sig_on()
^
------------------------------------------------------------
src/pyfasttext.pyx:546:6: 'sig_on' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
for line in lines:
line = bytes(line, self.encoding)
deref(iss).str(line)
sig_on()
self.ft.predict(deref(iss), k, c_predictions)
sig_off()
^
------------------------------------------------------------
src/pyfasttext.pyx:548:6: 'sig_off' is not a constant, variable or function identifier
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-ottj3fbr/pyfasttext/setup.py", line 58, in <module>
ext_modules=cythonize(extension, compile_time_env={'USE_NUMPY': USE_NUMPY}),
File "/home/styrke/miniconda3/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1039, in cythonize
cythonize_one(*args)
File "/home/styrke/miniconda3/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1161, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: src/pyfasttext.pyx
src/pyfasttext.pyx: cannot find cimported module 'cysignals.signals'
Compiling src/pyfasttext.pyx because it depends on /home/styrke/miniconda3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd.
[1/1] Cythonizing src/pyfasttext.pyx
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ottj3fbr/pyfasttext/
Installing cysignals manually with pip install cysignals before trying pip install pyfasttext again solved the problem.
It seems like cysignals somehow didn't really register as a requirement in setup.py?
The text was updated successfully, but these errors were encountered:
I tried to install pyfasttext from pip but had the following error:
Installing cysignals manually with
pip install cysignals
before tryingpip install pyfasttext
again solved the problem.It seems like cysignals somehow didn't really register as a requirement in setup.py?
The text was updated successfully, but these errors were encountered: