Cython compile with MacOS 14, Spacy 3.7.2 and Cython 3.0.4 #13077
-
Hi all... I have used Spacy for many years now but am very new to Cython and attempting to look at speeding up parts of our pipleline with Cython. However, I am stuck at the most basic of questions. I can't find a solution to the Cython extension build to find the spacy components on my system. I always get a bund of comiple errors starting with: from setuptools import setup, Extension module = Extension ('ds_class_fast', sources=['async_classify/cython_file.pyx'], setup( I have tried many different iterations of the path but nothing seems to work. The cython file is the most basic at this point just to point to something. Which is: #cython: infer_types=True from cymem.cymem cimport Pool from spacy.tokens cimport Doc doc = Doc(Vocab()) I realize this does almost nothing but it was just to see if I can get the compile to work. Any assistance to help me in the right direction would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is definitely frustrating. If it helps, I made a demo package that shows how to create a package with a custom extended spacy https://github.com/adrianeboyd/custom-cython-tokenizer You shouldn't need to specify the spacy path in If you're using |
Beta Was this translation helpful? Give feedback.
Thanks for this Adriane.. It did help but just for your info the issue seems to be the version of Cython. There seems to be an issue with the 3.0.4 version I was using linking to relative repository references. I downgraded and it worked fine. Thanks again for your help!