Install issue related to Apple silicon
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the reported pip install woocommerce and from woocommerce import API failure on Apple silicon with Python 3.9. Check how the package declares its dependencies and verify that a clean install imports successfully without manually installing chardet.
Written by the indexing model from the issue text.
Description
Did a basic install of the library:
pip install woocommerce
Tried to follow example:
from woocommerce import API
Python 3.9.5 (default, May 4 2021, 03:36:27)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from woocommerce import API
Traceback (most recent call last):
File "/Users/user/Library/Python/3.9/lib/python/site-packages/requests/compat.py", line 11, in <module>
import chardet
ModuleNotFoundError: No module named 'chardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/user/Library/Python/3.9/lib/python/site-packages/woocommerce/__init__.py", line 17, in <module>
from woocommerce.api import API
File "/Users/user/Library/Python/3.9/lib/python/site-packages/woocommerce/api.py", line 12, in <module>
from requests import request
File "/Users/user/Library/Python/3.9/lib/python/site-packages/requests/__init__.py", line 45, in <module>
from .exceptions import RequestsDependencyWarning
File "/Users/user/Library/Python/3.9/lib/python/site-packages/requests/exceptions.py", line 9, in <module>
from .compat import JSONDecodeError as CompatJSONDecodeError
File "/Users/user/Library/Python/3.9/lib/python/site-packages/requests/compat.py", line 13, in <module>
import charset_normalizer as chardet
File "/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/__init__.py", line 24, in <module>
from .api import from_bytes, from_fp, from_path, is_binary
File "/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/api.py", line 5, in <module>
from .cd import (
File "/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/cd.py", line 14, in <module>
from .md import is_suspiciously_successive_range
ImportError: dlopen(/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/md.cpython-39-darwin.so, 0x0002): tried: '/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/md.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/md.cpython-39-darwin.so' (no such file), '/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/md.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
The issue seems to be with chardet, but the secondary issue was related to architecture: (have 'arm64', need 'x86_64').
Solution
pip install chardet
Manually installing chardet fixed the issue.
- Dominant language
- Python
- Stars
- 216
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from woocommerce/wc-api-python
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
woocommerce/wc-api-python#108 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
woocommerce/wc-api-python#106 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
woocommerce/wc-api-python#105 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
woocommerce/wc-api-python#104 ·
-
Json FormattingOpen
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
woocommerce/wc-api-python#103 ·
All issues in woocommerce/wc-api-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug difficulty:2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MakazhanAlpamys/Soup#3167 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
snap-stanford/Biomni#380 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jsboige/CoursIA#27768 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 66/100
rossant/awesome-math#206 ·