OpenCC: Cannot import OpenCC using Python on macOS Ventura
Hi everyone,
Problem Description
I get following error when I am running import opencc with Python:
OSError: dlopen(libopencc.so.1, 0x0006): tried: 'libopencc.so.1' (no such file).
Steps to Reproduce I am using macOS Ventura 13.1, and Mamba with a virtual environment to use Python (version 3.10.8).
I first installed OpenCC via Homebrew running brew install opencc, and then installed OpenCC with pip in my virtual environment running pip install opencc. The first thing I noticed is that pip is installing OpenCC version 0.2 instead of the latest version (1.1.6 up to now). I also tried to reinstall OpenCC using this file and using brew install opencc.rb, but it led to the same result.
I checked that Homebrew installed correctly OpenCC on my computer: running which opencc, I get the following path: /opt/homebrew/bin/opencc.
I suppose there is a confusion between opencc and libopencc.so.1 libraries, but I am currently unable to fix this problem.
I hope someone could help!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (5 by maintainers)
That’s how I install Python opencc on Apple M1.
My environment: