- Notifications
You must be signed in to change notification settings - Fork110
Open
Description
Did a basic install of the library:
pip install woocommerce
Tried to follow example:
fromwoocommerceimportAPIPython3.9.5 (default,May42021,03:36:27) [Clang12.0.0 (clang-1200.0.32.29)]ondarwinType"help","copyright","credits"or"license"formoreinformation.>>>fromwoocommerceimportAPITraceback (mostrecentcalllast):File"/Users/user/Library/Python/3.9/lib/python/site-packages/requests/compat.py",line11,in<module>importchardetModuleNotFoundError:Nomodulenamed'chardet'Duringhandlingoftheaboveexception,anotherexceptionoccurred:Traceback (mostrecentcalllast):File"<stdin>",line1,in<module>File"/Users/user/Library/Python/3.9/lib/python/site-packages/woocommerce/__init__.py",line17,in<module>fromwoocommerce.apiimportAPIFile"/Users/user/Library/Python/3.9/lib/python/site-packages/woocommerce/api.py",line12,in<module>fromrequestsimportrequestFile"/Users/user/Library/Python/3.9/lib/python/site-packages/requests/__init__.py",line45,in<module>from .exceptionsimportRequestsDependencyWarningFile"/Users/user/Library/Python/3.9/lib/python/site-packages/requests/exceptions.py",line9,in<module>from .compatimportJSONDecodeErrorasCompatJSONDecodeErrorFile"/Users/user/Library/Python/3.9/lib/python/site-packages/requests/compat.py",line13,in<module>importcharset_normalizeraschardetFile"/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/__init__.py",line24,in<module>from .apiimportfrom_bytes,from_fp,from_path,is_binaryFile"/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/api.py",line5,in<module>from .cdimport (File"/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/cd.py",line14,in<module>from .mdimportis_suspiciously_successive_rangeImportError: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-ofile,butisanincompatiblearchitecture (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' (nosuchfile),'/Users/user/Library/Python/3.9/lib/python/site-packages/charset_normalizer/md.cpython-39-darwin.so' (mach-ofile,butisanincompatiblearchitecture (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.
Metadata
Metadata
Assignees
Labels
No labels