afsara_ben
afsara_ben

Reputation: 672

cannot install nltk for mac m1

Can nltk be installed on the mac m1 arm64 version? I am getting the following error and cannot seem to find a mac m1 compatible version

import regex._regex as _regex ImportError: dlopen(/Users/afsarabenazir/Library/Python/3.10/lib/python/site-packages/regex/_regex.cpython-310-darwin.so, 0x000A): tried: '/Users/afsarabenazir/Library/Python/3.10/lib/python/site-packages/regex/_regex.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/afsarabenazir/Library/Python/3.10/lib/python/site-packages/regex/_regex.cpython-310-darwin.so' (no such file), '/Users/afsarabenazir/Library/Python/3.10/lib/python/site-packages/regex/_regex.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

Upvotes: 1

Views: 361

Answers (1)

afsara_ben
afsara_ben

Reputation: 672

running the following worked

arch -x86_64 pip3 install nltk

Upvotes: 1

Related Questions