Install Keras, Tensorflow in MacOS


“Homebrew” install

/usr/bin/ruby -e “$(curl -fsSL"

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.


tensorflow 2.0.0

opencv 4




Then install the left

pip install scikit-learn

pip install matplotlib

pip install progressbar2

pip install beautifulsoup4

pip install pandas

Now test your installation