question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to set up developer environment on Mac M1

See original GitHub issue

System Info

As MacBooks with the M1 chip need tensorflow-macos installed instead of tensorflow>=2.3 (as listed in the setup.py) file trying to set up a developer environment on a M1 MacBook produces the following error:

ERROR: Could not find a version that satisfies the requirement tensorflow>=2.3; extra == "dev" (from transformers[dev]) (from versions: none)
ERROR: No matching distribution found for tensorflow>=2.3; extra == "dev"

Is there any way around this? I tried replacing with tensorflow-macos but that creates a myriad of other issues when trying to set up the developer environment.

transformers 4.21.0 python 3.9.12

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, …)
  • My own task or dataset (give details below)

Reproduction

pip install -e ".[dev]"

Expected behavior

Developer environment should be installed without errors.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
KMFODAcommented, Aug 3, 2022

Amazing that seems to work for now. Thanks for the help!

1reaction
ArthurZuckercommented, Aug 1, 2022

Hey! Thanks for the issue. I managed to get it work doing the following :

  1. Replace tensorflow with tensorflow-macos in the setup.py file.
  2. Install particular dependencies manually
brew install llvm
conda install -c apple tensorflow-deps
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal
pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
pip install fugashi==1.1.2a6
pip install numba
brew install cmake 
brew install rust 
conda install -c conda-forge onnxruntime
  1. Just run pip install -e ".[dev]" and it should work 😃.
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set up an M1 MacBook for web development
In this tutorial, we set up web development tools for our MacBook in just 20 minutes, including Git, GitHub, VS Code, and Powerline...
Read more >
How to Install Unsupported Development Software on M1 Macs
Most tools and programs will work perfectly fine on M1 architecture, but some tools require installation that won't work. In our example, ...
Read more >
Development Setup for an M1 Mac - Lynn Root
Open Finder to /Applications (or /Applications/Utilities if using Terminal. · Create a copy of iTerm. · Right-click on the new Rosetta terminal ...
Read more >
Apple Silicon (M1) Chip Dev Environment Setup - Four Kitchens
In short, it has stalled due to some upstream requirements from packages that Docker installs (though Docker Desktop for Mac itself is ready), ......
Read more >
Open a Mac app from an unidentified developer - Apple Support
The safest approach is to look for a later version of the app from the Mac App Store or look for an alternative...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found