GithubHelp home page GithubHelp logo

Comments (13)

Willian-Zhang avatar Willian-Zhang commented on May 27, 2024 2

try deactivate and conda deactivate , also be sure to use Terminal.app instead of any IDE before running the installation script .

from tensorflow_macos.

ttopac avatar ttopac commented on May 27, 2024

I am having the same issue. For some reason the script in the homepage doesn't seem to be installing the arm version on my M1 Mac.

from tensorflow_macos.

noahc1510 avatar noahc1510 commented on May 27, 2024

I have the same issue, too. But I installed it on anaconda base on intel platform.

from tensorflow_macos.

thomastiotto avatar thomastiotto commented on May 27, 2024

Same issue here in Apple Silicon Mac

from tensorflow_macos.

SevenChords avatar SevenChords commented on May 27, 2024

same issue here, also using an Apple Silicon Mac, installed using anaconda3.8 since the new macs with the M1 chip ship with python version 3.9 and tensorflow_macos requires python 3.8

from tensorflow_macos.

mostsignificantbit avatar mostsignificantbit commented on May 27, 2024

try deactivate and conda deactivate , also be sure to use Terminal.app instead of any IDE before running the installation script .

as well the initiation command should be triggered from an expected cpu process: i.e. using any x86 IDE built in terminal to start python will start the x86 python version of the universal app installed /usr/bin and lead to the unwanted results that are experienced here.

So what to do on a M1 Mac?

  • don't install any additional python versions which are not universal, i.e. just install the one that comes from Apple with Xcode command line tools / or make sure these are not used for your use case of testing arm64 Tensorflow
  • the correct one is at /usr/bin/python3 and using the command >$file /usr/bin/python3< should reveal both architectures
  • use the macOS terminal.app (it's an arm64 process) to install the Tensorflow package (this will install the arm version)
  • use the macOS terminal.app (not a x86 IDE / it's built in terminal, like VStudioCode or PyCharm) to start your virtual environment and run the scripts

from tensorflow_macos.

mostsignificantbit avatar mostsignificantbit commented on May 27, 2024

same issue here, also using an Apple Silicon Mac, installed using anaconda3.8 since the new macs with the M1 chip ship with python version 3.9 and tensorflow_macos requires python 3.8

Mine came with 3.8.2 (I guess by installing the Xcode command line tools) . So I guess you installed something additionally that installed a non universal Python. You can check it with >file $(which python3)<

from tensorflow_macos.

fzzfbyx avatar fzzfbyx commented on May 27, 2024

thank you so much.just delete all other python version and use the original python 3.8 which is in user/bin to create the virtualenv.and don't use any IDE.Problem solved.

from tensorflow_macos.

SevenChords avatar SevenChords commented on May 27, 2024

can't do @mostsignificantbit since all Apple Silicon macs ship with python 3.9 and don't have python 3.8 installed, you have to install tensorflow through another installation of python, if you try the one installes in usr/bin you will get an error because that one is version 3.9 and tensorflow_macos needs python 3.8

from tensorflow_macos.

fzzfbyx avatar fzzfbyx commented on May 27, 2024

the verison of python in usr/bin is 3.8 and it has two architectures(the file name is python3).I just uninstall all other python downloaded from web and use that one.It worked.

from tensorflow_macos.

mostsignificantbit avatar mostsignificantbit commented on May 27, 2024

can't do @mostsignificantbit since all Apple Silicon macs ship with python 3.9 and don't have python 3.8 installed, you have to install tensorflow through another installation of python, if you try the one installes in usr/bin you will get an error because that one is version 3.9 and tensorflow_macos needs python 3.8

please check again, mine shipped with 3.8.2 as pointed out above.
type in the terminal

file $(which python3)

You should get a result like this, otherwise you overwrote your install:

/usr/bin/python3 (for architecture x86_64):	Mach-O 64-bit executable x86_64
/usr/bin/python3 (for architecture arm64e):	Mach-O 64-bit executable arm64e

python3 --version
Python 3.8.2

from tensorflow_macos.

SevenChords avatar SevenChords commented on May 27, 2024

ok, just checked, when i first got it it shipped with 3.9, but i had to do a reinstall of macos because of some other thing, and now it has 3.8.2 installed, anyway, now it should work

from tensorflow_macos.

diogoribeiro09 avatar diogoribeiro09 commented on May 27, 2024

Sorry to bring back this topic from the dead but somehow i overwrote the default python path. When i do file $(which python3) I get:

/Library/Frameworks/Python.framework/Versions/3.8/bin/python3: Mach-O 64-bit executable x86_64

Is there a way to point it back to /usr/bin/python3 ?

Edit: Funny I found this 2 min after i wrote this when i spent the whole afternoon trying to figure it out. I was able to rever it back by uninstalling all other versions of python in my system with these commands:

sudo rm -rf “/Applications/Python”
sudo rm -rf /Library/Frameworks/Python.framework

And finally:

/usr/bin/python3: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e] /usr/bin/python3 (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/python3 (for architecture arm64e): Mach-O 64-bit executable arm64e

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.