Install Keras, Tensorflow in MacOS

QUANG NHAT TRAN
Oct 23, 2020

--

Requirements

“Homebrew” install

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Python 3.7 install

brew install python@3.7

Python path should not be a system path (/usr/bin/python3)

We need to change the path

then modified

ctrl + x to save and then

now test your command

Now let’s start to install the denpencies

Install pip and virtual environments

To overcome this problem

Then edit the version of pip

Then go back to the terminal and check your command.

Now we can install the virtual environment and virtual environment wrapper.

Modified virtual path

source .zshrc again

now you can able to create a new virtual env

To make zsh able to see when you enter to virtual environment or not, we need to configure the .zshrc profile

Source the .zshrc again, then move to (workon dl4cv)the virtual environment we have created above. You can see that the “(dl4cv)” appears on the right-hand side.

In order to exist the environment, we need to use the command “deactivate”

Let’s start to install the library in this environment.

numpy

tensorflow 2.0.0

opencv 4

scikit-image

pillow

imultils

Then install the left

pip install scikit-learn

pip install matplotlib

pip install progressbar2

pip install beautifulsoup4

pip install pandas

Now test your installation

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

QUANG NHAT TRAN
QUANG NHAT TRAN

Written by QUANG NHAT TRAN

Certified Mendix Expert MVP, Data Scientist, and Technical Practitioner @ TBN Software

No responses yet

Write a response