Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't pip install on Apple Silicon #15

Open
jtauber opened this issue May 7, 2023 · 4 comments
Open

can't pip install on Apple Silicon #15

jtauber opened this issue May 7, 2023 · 4 comments

Comments

@jtauber
Copy link

jtauber commented May 7, 2023

This may be an upstream Tensorflow issue but it doesn't appear to be possible to install bookNLP on Apple Silicon.

I'll continue to investigate but wanted to create this issue here to track and also get input from others who have encountered this.

@jtauber
Copy link
Author

jtauber commented May 7, 2023

Okay, the workaround seemed to be pretty straightforward but is probably worth sharing:

I installed the dependencies individually, replacing tensorflow with tensorflow-macos and then used pip install --no-dependencies booknlp and it worked.

@DrewThomasson
Copy link

does pip install tensorflow-metal also work?

hoping that can give it the neural chip speed up of the apple silicone chip

@DrewThomasson
Copy link

DrewThomasson commented Mar 4, 2024

I updated the instruction cause the transformers version doesn't work.

pip install tensorflow-macos
pip install torch
pip install spacy
pip install transformers==4.30.0
pip install --no-dependencies booknlp

and it should run on the cpu at least, it works for me

update:

installing pip install tensorflow-metal doesn't seem to effect what it runs on my end, it still runs own the CPU but ey it works!`

@DrewThomasson
Copy link

DrewThomasson commented May 16, 2024

case no one else I made a booknlp pip install specifically for apple silicone!
No npu or gpu speedup tho :(

pip install apple-silicon-booknlp

just make sure its in a python 3.10 env or the transformers wheel won't do its thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants