cheat.sh
cheat.sh copied to clipboard
Standalone installation failed on Mac M1
Hi @chubin, Thanks for the amazing project.
I tried the standalone installation of cheat.sh on my Mac M1 machine, it failed with the following error:
$cht.sh python read file
Traceback (most recent call last):
File "/Users/harshgupta/.cheat.sh/lib/standalone.py", line 17, in <module>
import cheat_wrapper
File "/Users/harshgupta/.cheat.sh/lib/cheat_wrapper.py", line 14, in <module>
from routing import get_answers, get_topics_list
File "/Users/harshgupta/.cheat.sh/lib/routing.py", line 15, in <module>
import adapter.cheat_sheets
File "/Users/harshgupta/.cheat.sh/lib/adapter/__init__.py", line 18, in <module>
from . import *
File "/Users/harshgupta/.cheat.sh/lib/adapter/question.py", line 15, in <module>
from polyglot.detect import Detector
File "/Users/harshgupta/.cheat.sh/ve/lib/python3.8/site-packages/polyglot/detect/__init__.py", line 1, in <module>
from .base import Detector, Language
File "/Users/harshgupta/.cheat.sh/ve/lib/python3.8/site-packages/polyglot/detect/base.py", line 11, in <module>
from icu import Locale
File "/Users/harshgupta/.cheat.sh/ve/lib/python3.8/site-packages/icu/__init__.py", line 37, in <module>
from ._icu_ import *
ImportError: dlopen(/Users/harshgupta/.cheat.sh/ve/lib/python3.8/site-packages/icu/_icu_.cpython-38-darwin.so, 2): Symbol not found: __ZN6icu_6918AnnualTimeZoneRule8MAX_YEARE
Referenced from: /Users/harshgupta/.cheat.sh/ve/lib/python3.8/site-packages/icu/_icu_.cpython-38-darwin.so
Expected in: flat namespace
in /Users/harshgupta/.cheat.sh/ve/lib/python3.8/site-packages/icu/_icu_.cpython-38-darwin.so
Other information:
- Python 3.8.5
- virtualenv 20.13.1
Looks like one of cheat.sh
dependencies - https://github.com/chubin/cheat.sh/blob/46d1a5f73c6b88da15d809154245dbf234e9479e/requirements.txt#L13 doesn't work on M1.
Having this issue as well.
Standalone installation worked just fine for me on an M1 Pro.
I added #336 for making PyICU and all multilingual features optional. It should help fix this issue