Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Development guide missing instructions for installing opencc on Apple Silicon #331

Closed
laike9m opened this issue Aug 7, 2023 · 5 comments
Assignees
Milestone

Comments

@laike9m
Copy link

laike9m commented Aug 7, 2023

Describe the bug
Following the development guide, running python manage.py check gives OSError: dlopen(libopencc.so.1, 0x0006): tried: 'libopencc.so.1' (no such file)...

Desktop (please complete the following information):
Mac M1

Additional context
It appears that opencc needs to be built from source on Apple Silicon
BYVoid/OpenCC#701
while for other architechtures it has pre-built wheels

An alternative solution might be to use opencc-python-reimplemented, though there's no guarantee if it works as good as the official version

@laike9m
Copy link
Author

laike9m commented Aug 7, 2023

Verified that the following steps can work:

  1. Make sure opencc has not been installed by pip, i.e. pip uninstall opencc

  2. Manually build and install opencc, make sure it's using the right Python version/environment

    git clone [email protected]:BYVoid/OpenCC.git
    cd OpenCC
    make python-build
    make python-install
    
  3. Verify if it's installed correctly, notice the output of Location

pip show opencc
Name: OpenCC
Version: 1.1.6
Summary: Conversion between Traditional and Simplified Chinese
Home-page: https://github.com/BYVoid/OpenCC
Author: Carbo Kuo, Peng Huang, Kefu Chai, LI Daobing, Asias, Peng Wu, Xiaojun Ma, 佛振
Author-email: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
License: Apache License 2.0
Location: installed-path/lib/python3.10/site-packages/OpenCC-1.1.6-py3.10-macosx-13.4-arm64.egg
Requires:
Required-by:

@alphatownsman
Copy link
Member

Thanks for reporting and investigation!

There were some other issues on macOS like #5 , not sure that's fixed on Apple's end or not.

Please feel free to submit PR for install docs

@laike9m
Copy link
Author

laike9m commented Aug 7, 2023

Sure, I'll create a PR

@frostming
Copy link

An alternative solution: BYVoid/OpenCC#701 (comment)

@alphatownsman
Copy link
Member

OpenCC is no longer used in latest code

@alphatownsman alphatownsman closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
@alphatownsman alphatownsman added this to the 0.9 milestone Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants