GithubHelp home page GithubHelp logo

Comments (25)

acere avatar acere commented on May 27, 2024 7

I managed to install using the installation script without changing or removing any of my existing python installation by indicating explicitly the system python3.8 binary with the --python flag.

The command I used is

~$ /bin/bash ./install_venv.sh tf_mac --python=/usr/bin/python3

from tensorflow_macos.

godkaieethu avatar godkaieethu commented on May 27, 2024 3

hello guys I think I have found the solution.
first, uninstall anaconda and any python3 that you didn't download from apple.
then please xcode-select --install(maybe you can download Xcode from app store)
after that, you will get python3.8 from apple, please check if your python version is 3.8.2 and it's path is/usr/bin/python3.
if succeed, run the install_venv.sh again.
ps:in last step, you should build a new venv, or just delete the old venv on anaconda/python3 not downloaded from apple
and it works finally.

from tensorflow_macos.

SuperBruceJia avatar SuperBruceJia commented on May 27, 2024 1

Hi guys, here is the final solution:

  1. Download the archive file manually from here (https://github.com/apple/tensorflow_macos/releases/download/v0.1alpha0/tensorflow_macos-0.1alpha0.tar.gz).

  2. Unpack it and rename all files inside x86_64/ folder if your are using an Intel-based CPU. They all contain _11_0. Rename it to _10_16.

  3. Open install_venv.sh and rename those filenames (rename macosx_11_0 to macosx_10_16):

arch_list_x86_64=( numpy-1.18.5-cp38-cp38-macosx_10_16_x86_64.whl grpcio-1.33.2-cp38-cp38-macosx_10_16_x86_64.whl h5py-2.10.0-cp38-cp38-macosx_10_16_x86_64.whl scipy-1.5.4-cp38-cp38-macosx_10_16_x86_64.whl tensorflow_addons-0.11.2+mlcompute-cp38-cp38-macosx_10_16_x86_64.whl )
  1. Scroll down and rename all macosx_11_0 to macosx_10_16

  2. Rename tensorflow_macos*-cp38-cp38-macosx_11_0_$arch.whl to tensorflow_macos*-cp38-cp38-macosx_10_16_$arch.whl.

"$python_bin" -m pip install --upgrade --force -t "$VIRTUAL_ENV/lib/python3.8/site-packages/" --no-dependencies "$package_dir"/tensorflow_macos*-cp38-cp38-macosx_10_16_$arch.whl
  1. Open terminal, go inside your tensorflow_macos folder and run
./install_venv.sh /Users/<your user>/tensorflow_macos_venv/

e.g., for me, it's ./install_venv.sh /Users/shuyuej/tensorflow_macos_venv/

  1. Use this script to activate environment
  . "/Users/<your user>/tensorflow_macos_venv/bin/activate"

e.g., for me, it's . "/Users/shuyuej/tensorflow_macos_venv/bin/activate"

Have fun!

from tensorflow_macos.

MarkusBansky avatar MarkusBansky commented on May 27, 2024 1

Does anybody know whether the source code of this optimised tensorflow package is going to be publicly available?

from tensorflow_macos.

SuperBruceJia avatar SuperBruceJia commented on May 27, 2024

Please refer to this issue:

#46

Have a wonderful day!

from tensorflow_macos.

 avatar commented on May 27, 2024

I totally uninstalled the conda and other environment then create environment and install tensorflow_macos . it works

from tensorflow_macos.

godkaieethu avatar godkaieethu commented on May 27, 2024

I totally uninstalled the conda and other environment then create environment and install tensorflow_macos . it works

I uninstalled the Conda and downloaded python3.8.6 from python.org and then install TensorFlow_macos,but still breaked by 'ERROR: numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl is not a supported wheel on this platform.'

from tensorflow_macos.

godkaieethu avatar godkaieethu commented on May 27, 2024

Hi,
I just followed the steps here and in this video: https://www.youtube.com/watch?v=6W8pjnW65Q8&feature=youtu.be .
I'm still unable to install tensorflow on my m1 mac. Please see error message below:

Installing bundled binary dependencies.
ERROR: numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl is not a supported wheel on this platform.

I've been trying to install tf for about 2 weeks now. I tried creating virtual environments through conda, venv and anaconda navigator. I tried putting together the various instructions given by contributors here, but still no success.
Please can someone help?

I am confused why other guys can succeed in MacBook m1.does my MacBook m1 have any difference with other's?

from tensorflow_macos.

icenando avatar icenando commented on May 27, 2024

I totally uninstalled the conda and other environment then create environment and install tensorflow_macos . it works

Please can you explain how you went about doing that? I thought I had too, but still the same problem, so maybe I did something wrong.

from tensorflow_macos.

juch0620 avatar juch0620 commented on May 27, 2024

I got same numpy error on M1 macbook pro when anaconda is installed in the first place.

Don't use anaconda (or similar) if it's not native code for M1, instead use Apple's native binary. I was able to install tensorflow for M1 without error after remove anaconda. basically, use python3 from Xcode-select.

$ xcode-select --install

from tensorflow_macos.

nuwansam avatar nuwansam commented on May 27, 2024

Is there a solution for M1 based macs.

from tensorflow_macos.

SuperBruceJia avatar SuperBruceJia commented on May 27, 2024

Is there a solution for M1 based macs.

Dude, I'm not sure yet since I don't keep a M1-chip-based machine, but u can definitely try it out to see whether it works or not.

P.S. I think it should work on M1-based mac. BTW, if u are installing it, be sure to modify arch_list_arm64 rather than arch_list_x86_64.

Good luck!

from tensorflow_macos.

LRSnowX avatar LRSnowX commented on May 27, 2024

It's not working on my M1 MacBook Pro.

Installing bundled binary dependencies.
ERROR: numpy-1.18.5-cp38-cp38-macosx_10_16_arm64.whl is not a supported wheel on this platform.

Hi guys, here is the final solution:

  1. Download the archive file manually from here (https://github.com/apple/tensorflow_macos/releases/download/v0.1alpha0/tensorflow_macos-0.1alpha0.tar.gz).
  2. Unpack it and rename all files inside x86_64/ folder if your are using an Intel-based CPU. They all contain _11_0. Rename it to _10_16.
  3. Open install_venv.sh and rename those filenames (rename macosx_11_0 to macosx_10_16):
arch_list_x86_64=( numpy-1.18.5-cp38-cp38-macosx_10_16_x86_64.whl grpcio-1.33.2-cp38-cp38-macosx_10_16_x86_64.whl h5py-2.10.0-cp38-cp38-macosx_10_16_x86_64.whl scipy-1.5.4-cp38-cp38-macosx_10_16_x86_64.whl tensorflow_addons-0.11.2+mlcompute-cp38-cp38-macosx_10_16_x86_64.whl )
  1. Scroll down and rename all macosx_11_0 to macosx_10_16
  2. Rename tensorflow_macos*-cp38-cp38-macosx_11_0_$arch.whl to tensorflow_macos*-cp38-cp38-macosx_10_16_$arch.whl.
"$python_bin" -m pip install --upgrade --force -t "$VIRTUAL_ENV/lib/python3.8/site-packages/" --no-dependencies "$package_dir"/tensorflow_macos*-cp38-cp38-macosx_10_16_$arch.whl
  1. Open terminal, go inside your tensorflow_macos folder and run
./install_venv.sh /Users/<your user>/tensorflow_macos_venv/

e.g., for me, it's ./install_venv.sh /Users/shuyuej/tensorflow_macos_venv/

  1. Use this script to activate environment
  . "/Users/<your user>/tensorflow_macos_venv/bin/activate"

e.g., for me, it's . "/Users/shuyuej/tensorflow_macos_venv/bin/activate"

Have fun!

from tensorflow_macos.

roy-ren avatar roy-ren commented on May 27, 2024

hello guys I think I have found the solution.
first, uninstall anaconda and any python3 that you didn't download from apple.
then please xcode-select --install(maybe you can download Xcode from app store)
after that, you will get python3.8 from apple, please check if your python version is 3.8.2 and it's path is/usr/bin/python3.
if succeed, run the install_venv.sh again.
ps:in last step, you should build a new venv, or just delete the old venv on anaconda/python3 not downloaded from apple
and it works finally.

Works for me.

from tensorflow_macos.

icenando avatar icenando commented on May 27, 2024

hello guys I think I have found the solution.
first, uninstall anaconda and any python3 that you didn't download from apple.
then please xcode-select --install(maybe you can download Xcode from app store)
after that, you will get python3.8 from apple, please check if your python version is 3.8.2 and it's path is/usr/bin/python3.
if succeed, run the install_venv.sh again.
ps:in last step, you should build a new venv, or just delete the old venv on anaconda/python3 not downloaded from apple
and it works finally.

This works for me too! Now I'm having problems importing pandas and matplotlib though...

from tensorflow_macos.

LRSnowX avatar LRSnowX commented on May 27, 2024

hello guys I think I have found the solution.
first, uninstall anaconda and any python3 that you didn't download from apple.
then please xcode-select --install(maybe you can download Xcode from app store)
after that, you will get python3.8 from apple, please check if your python version is 3.8.2 and it's path is/usr/bin/python3.
if succeed, run the install_venv.sh again.
ps:in last step, you should build a new venv, or just delete the old venv on anaconda/python3 not downloaded from apple
and it works finally.

this works for me too! thank you so much

from tensorflow_macos.

monikavila avatar monikavila commented on May 27, 2024

hello guys I think I have found the solution.
first, uninstall anaconda and any python3 that you didn't download from apple.
then please xcode-select --install(maybe you can download Xcode from app store)
after that, you will get python3.8 from apple, please check if your python version is 3.8.2 and it's path is/usr/bin/python3.
if succeed, run the install_venv.sh again.
ps:in last step, you should build a new venv, or just delete the old venv on anaconda/python3 not downloaded from apple
and it works finally.

@godkaieethu I downloaded Xcode but I have python 2.7. How can I update it?

from tensorflow_macos.

godkaieethu avatar godkaieethu commented on May 27, 2024

hello guys I think I have found the solution.
first, uninstall anaconda and any python3 that you didn't download from apple.
then please xcode-select --install(maybe you can download Xcode from app store)
after that, you will get python3.8 from apple, please check if your python version is 3.8.2 and it's path is/usr/bin/python3.
if succeed, run the install_venv.sh again.
ps:in last step, you should build a new venv, or just delete the old venv on anaconda/python3 not downloaded from apple
and it works finally.

@godkaieethu I downloaded Xcode but I have python 2.7. How can I update it?

try running "$ xcode-select --install " in terminal.

from tensorflow_macos.

monikavila avatar monikavila commented on May 27, 2024

hello guys I think I have found the solution.
first, uninstall anaconda and any python3 that you didn't download from apple.
then please xcode-select --install(maybe you can download Xcode from app store)
after that, you will get python3.8 from apple, please check if your python version is 3.8.2 and it's path is/usr/bin/python3.
if succeed, run the install_venv.sh again.
ps:in last step, you should build a new venv, or just delete the old venv on anaconda/python3 not downloaded from apple
and it works finally.

@godkaieethu I downloaded Xcode but I have python 2.7. How can I update it?

try running "$ xcode-select --install " in terminal.

@godkaieethu it does not work

from tensorflow_macos.

godkaieethu avatar godkaieethu commented on May 27, 2024

hello guys I think I have found the solution.
first, uninstall anaconda and any python3 that you didn't download from apple.
then please xcode-select --install(maybe you can download Xcode from app store)
after that, you will get python3.8 from apple, please check if your python version is 3.8.2 and it's path is/usr/bin/python3.
if succeed, run the install_venv.sh again.
ps:in last step, you should build a new venv, or just delete the old venv on anaconda/python3 not downloaded from apple
and it works finally.

@godkaieethu I downloaded Xcode but I have python 2.7. How can I update it?

try running "$ xcode-select --install " in terminal.

@godkaieethu it does not work

maybe you can follow Mr icenando's whole steps about this xcode solution in issue #46
he follow my steps but give more details.
hope it can work,good luck!

from tensorflow_macos.

monikavila avatar monikavila commented on May 27, 2024

hello guys I think I have found the solution.
first, uninstall anaconda and any python3 that you didn't download from apple.
then please xcode-select --install(maybe you can download Xcode from app store)
after that, you will get python3.8 from apple, please check if your python version is 3.8.2 and it's path is/usr/bin/python3.
if succeed, run the install_venv.sh again.
ps:in last step, you should build a new venv, or just delete the old venv on anaconda/python3 not downloaded from apple
and it works finally.

@godkaieethu I downloaded Xcode but I have python 2.7. How can I update it?

try running "$ xcode-select --install " in terminal.

Finally, it worked! I had to uninstall python and then get command line tools from apple developer.
Thanks so much for your help!

from tensorflow_macos.

monikavila avatar monikavila commented on May 27, 2024

Hello, I managed to install but when I want to import keras and matplotlib I have errors. Do you have any problem with that?

from tensorflow_macos.

icenando avatar icenando commented on May 27, 2024

Hello, I managed to install but when I want to import keras and matplotlib I have errors. Do you have any problem with that?

@monikavila I managed to import Keras. I activated my venv and typed: python3 -m pip install keras . There were no error messages and I can import it in Jupyter Labs without any issues. Haven't actually fitted a model yet to test though.

Pandas and Matplotlib don't seem to work...

from tensorflow_macos.

mwidjaja1 avatar mwidjaja1 commented on May 27, 2024

For anyone tuning in later, the latest Tensorflow install script seems to have a typo with some case mismatches in the variable names. I proposed a Pull Request to fix that & add Conda support (so you can install TF in your Miniforge Conda environment). I also provided instructions for how I ran it.

Feel free to manually apply my changes and see how it goes for you: #63

from tensorflow_macos.

SaschaHeyer avatar SaschaHeyer commented on May 27, 2024

Can confirm the same behavior without conda #121

from tensorflow_macos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.