GithubHelp home page GithubHelp logo

andy-96 / tensorflow_macos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apple/tensorflow_macos

0.0 0.0 0.0 16 KB

TensorFlow for macOS 11.0+ accelerated using Apple's ML Compute framework.

Shell 100.00%

tensorflow_macos's Introduction

Installing Tensorflow for M1

Preparation

  1. Use Apple's Python 3.8.2 version. Verify this by checking which python3, it should be /usr/bin/python3
  2. Deactivate anaconda environment, if it is activated
  3. Download .tar.gz archive: https://github.com/apple/tensorflow_macos/releases (Current version: v0.1alpha1)
  4. Change all files under tensorflow_macos/arm64 from *-cp38-macosx_11_0_*.whl to *-cp38-macosx_10_16_*.whl
  5. Replace this repo's install script ./install_venv.sh with original one

Using Python's venv

  1. Cd into your project repo
  2. Create virtual environment: python3 -m venv .venv
  3. Make sure the used python version in your venv is python 3.8 if you have other Python versions installed
  4. Run <path-to-tensorflow_macos>/tensorflow_macos/install_venv.sh and use <path-to-project>/.venv as the venv folder
  5. Activate venv: .venv/bin/activate

Using Pipenv

  1. Cd into your project repo
  2. Create virtual environment: pipenv --python 3.8
  3. Run pipenv shell and copy the virtualenv path
  4. Run ``<path-to-tensorflow_macos>/tensorflow_macos/install_venv.sh` and use the virtualenv path

Test whether it worked

  1. Activate virtualenv
  2. Run python
  3. import tensorflow as tf
  4. print(tf.constant(4))

tensorflow_macos's People

Contributors

andy-96 avatar

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.