I am trying to install several packages on a virtual environment on a Mac (OS X El Capitan 10.11.6). I have successfully installed polyglot (version 16.7.4). Everything works fine until I launched Python (version 3.6).
This is what I get as a result of a try to import text from polyglot.
>>> import polyglot
>>> from polyglot import text
sh: grep: command not found
sh: sysctl: command not found
sh: sw_vers: command not found
sh: grep: command not found
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<WORKING DIRECTORY>/lib/python3.6/site-packages/polyglot/text.py", line 9, in <module>
from polyglot.detect import Detector, Language
File "<WORKING DIRECTORY>/lib/python3.6/site-packages/polyglot/detect/__init__.py", line 1, in <module>
from .base import Detector, Language
File "<WORKING DIRECTORY>/lib/python3.6/site-packages/polyglot/detect/base.py", line 11, in <module>
from icu import Locale
ModuleNotFoundError: No module named 'icu'
>>>
To create the virtual environment I ran the venv module as a script with the directory path.
Any idea on what to do?
The author of polyglot
has forgotten to list requirements in setup.py
so pip install polyglot
doesn't install them automatically. Please report the bug to the issue tracker.
Meanwhile dowload polyglot sources and run
pip install -r requirements.txt
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.