![]() $ source tensorflow-metal-test/bin/activateīut it will raise error: Building wheels for collected packages: h5pyīuilding wheel for h5py (pyproject.toml). My hardware version: Apple M1-chip, OS X 12.1 Montereyįirst we shall download and install python 3.9.4 universal 64bit version from (I can’t find the original solution website) and then run (Refer this quetion): Many said that we should install miniforge for arm64 and install tensorflow-macos in this kind of “conda” (Refer this post) but I failed again. Okay then I’ll install tensorflow-macos, but another problem occurred: (base) ~ pip install tensorflow-macosĮRROR: Could not find a version that satisfies the requirement tensorflow-macos (from versions: none)ĮRROR: No matching distribution found for tensorflow-macosĪfter searching on the Internet hard for the whole morning, I found the solution. At first I used conda and reinstalled several times but after each installation I met the problem: > import tensorflow as tfĪfter searching on the Internet, I found that it is because that Tensorflow doesn’t support MacOS but only Ubuntu and Windows. Install Tensorflow on M1 MacĪs a friend of bugs who fought with Python for hundreds of times, I still stepped into trouble during my installation. Because of my little experience on Tensorflow, I compared using some example codes and didn’t carry out large-scale benchmarks. Return sys.platform = 'darwin' and V(platform.mac_ver()) >= V('10.9') and platform.Having heard of the amazing computing power of M1-chip long before, I can’t miss a chance to try on my M1 Mac (2020 Mbp with M1 Chip) in excitement. In the _use_appnope() function, edit the return line as follows: Then go to lib/python3.8/site-packages/ipykernelĮdit the eventloops.py file using nano eventloops.py ![]() Then name your virtual environment's folder 3. Then add homebrew's path to the variable path:Įcho 'eval $(/opt/homebrew/bin/brew shellenv)' > /Users/bcghostpc/.zprofile eval $(/opt/homebrew/bin/brew shellenv) Type in your terminal (not in rosetta environment): ![]() You can install all the following modules by creating a Virtual Environment, and then installing all these modules inside that Virtual Environment. This confuses me and is probably the reason why my code is not working. Why do I get 'Mach-O 64-bit executable x86_64' here even though I get 'arm64' before? Users/user/venv/bin/python: Mach-O 64-bit executable x86_64 Users/user/opt/anaconda3/bin/python: Mach-O 64-bit executable x86_64 If I run file $(which python) I get the following: When I activate my environment I still get: I'm using Python 3.8 and I'm running my terminal not rosetta:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |