chubin / chubin/cheat.sh

Standalone installation failed on Mac M1

Open
#327 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
41.7k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Hi @chubin,
Thanks for the amazing project.

I tried the [standalone installation of cheat.sh](https://github.com/chubin/cheat.sh/blob/master/doc/standalone.md) on my Mac M1 machine, it failed with the following error:

```python
$cht.sh python read file
Traceback (most recent call last):
File "/Users/harshgupta/.cheat.sh/lib/standalone.py", line 17, in
import cheat_wrapper
File "/Users/harshgupta/.cheat.sh/lib/cheat_wrapper.py", line 14, in
from routing import get_answers, get_topics_list
File "/Users/harshgupta/.cheat.sh/lib/routing.py", line 15, in
import adapter.cheat_sheets
File "/Users/harshgupta/.cheat.sh/lib/adapter/__init__.py", line 18, in
from . import *
File "/Users/harshgupta/.cheat.sh/lib/adapter/question.py", line 15, in
from polyglot.detect import Detector
File "/Users/harshgupta/.cheat.sh/ve/lib/python3.8/site-packages/polyglot/detect/__init__.py", line 1, in
from .base import Detector, Language
File "/Users/harshgupta/.cheat.sh/ve/lib/python3.8/site-packages/polyglot/detect/base.py", line 11, in
from icu import Locale
File "/Users/harshgupta/.cheat.sh/ve/lib/python3.8/site-packages/icu/__init__.py", line 37, in
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

Contributor guide

Open the contributing guide

Research direction

Follow doc/standalone.md and reproduce the standalone installation on a Mac M1 with Python 3.8.5. Start with lib/standalone.py, lib/cheat_wrapper.py, lib/routing.py, and lib/adapter/question.py, then inspect the polyglot and icu import failure shown in the traceback. Done means the standalone command installs and runs without this ImportError.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.