The main modification needed to run pyGenieScript
on Apple Silicon is related to the various python libraries used by genienlp.
The author of this page hasn't scucessfully installed genienlp natively.
(so if anyone discovered a method, definitely let us know!
The problem is not inside genienlp itself but is due to the various libraries used by it and its dependencies, e.g. bootleg
).
Instead, we recommend using rosetta for now.
-
Credit to here, run
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
, followed byarch -x86_64 brew install [email protected]
. Then, export its path as prompted by brew: the command should be something likeexport PATH="/Users/${whoami}/Library/Python/3.7/bin:$PATH"
. -
Install genienlp as usual by running
pip3.7 install genienlp==0.7.0a4
; -
Verify you can execute the binary by running
genienlp train
. You should be able to see a print out of arguments information.
- Where is the ARM brew? Is it still going to be around?
Yes. After doing step 1, you should have two brews installed (unless you never installed brew). The ARM brew can typically be found at
/opt/homebrew/bin/brew
while the intel brew can be found at/usr/local/bin/brew
. You can still prioritize the ARM brew for ordinary tasks and only use the intel brew for this installation.
- I have successfully installed
genienlp
but seeImportError: cannot import name 'NonNegativeFloat' from 'pydantic'
when runninggenienlp
.
This is due to an issue with
pydantic
version. You can runpip3.7 install pydantic==1.8.2
to solve this problem.
- I have successfully installed
genienlp
but seeImportError: cannot import name 'get_terminal_size' from 'click.termui'
when runninggenienlp
.
This is due to an issue with
click
version. You can runpip3.7 install click==7.1.2
to solve this problem.
- I have installed brew in
/usr/local/bin/brew
butwhich brew
still shows up in the old location/opt/homebrew/bin/brew
Editing your shell profile file (e.g. .bash_profile, .bashrc, .zshrc, etc.) adding the following line to it:
export PATH="/usr/local/bin:$PATH"
. Then runsource ~/.bash_profile
(or your equivalent shell profile file) to update the terminal.