Can't get cyhunspell to work on spaces
My requirements file initially contained cyhunspell==2.0.2 but this isn’t available so I dropped the version part. And now I get this error:RuntimeError: Package hunspell was not found in the pkg-config search path.Perhaps you should add the directory containing `hunspell.pc’to the PKG_CONFIG_PATH environment variablePackage ‘hunspell’, required by ‘virtual:world’, not foundI then added python_version: 3.9.13 to README.md and it still fails like before.So I turned on debug mode and used the online VsCode to try to run commands in the terminal. The first thing I noticed is that python --version returns Python 3.10.13 but I’m expecting 3.9.13. I can’t install 3.9.13 in the terminal as I don’t have permission. I get the same errors in the terminal that I saw in the log files.So I’m totally stuck. Please help!
2024-11-12T01:04:08Z
I can’t be sure because I can’t see the source for Spaces, but I think you need to manually install thehunspellpackage using apt get.You can usesubprocessor Docker.If it’s built into HF, you only need to writehunspellinpackages.txt, but I think it’s probably not built in. This method is sufficient for major libraries likeffmpeg.github.comGitHub - hunspell/hunspell: The most popular spellchecking library.The most popular spellchecking library.I think the reason Python 3.10 is returned is probably because dev mode is dedicated to Python 3.10.The default for HF is 3.10, and Zero GPU space is basically dedicated to 3.10, but I think it is also possible that dev mode is the same.
2024-11-12T15:53:28Z
John6666:o writehunspellinpackages.txt,Hi John,Thanks a mill for that. I put hunspell in packages.txt and it seems it is built in. It was building fine until it gets to cyhunspell in requirements.txt, and then it fails again as per before. I also added other dependencies to pre-requirements.txt, and switched back to default python version.  So I’m still stuck.The odd thing is that I can create a subfolder with the files including requirements.txt and then use a debug online VsCode terminal to cd into ~/app/subfolder; I can then pip install the contents of pre-requirements.txt and then runpip install --editable .This then installs everything without errors.  Hmmm, I’d love to know why is works in debug but not in the App environment???
2024-11-13T01:14:25Z
I’m glad it was included. If it works in the debug environment (dev mode), it should probably work, but that’s strange.You should think of thepre-requirements.txtfile in HF as being effectively dedicated to upgrading pip.The fact that it works when it’s in a subfolder is still strange. If there is a conflict with the default file in Spaces, etc., you may be able to get it to work by doingsubprocess.run(“pip install cyhunspell”, shell=True)inapp.py.