pyenv Tutorial

1. Install Python version:

$ pyenv install 3.6.7


2. Create virtual environment:

$ pyenv virtualenv 3.6.7 my_venv


3. Activate your virtual environment:

pyenv activate my_venv

Install tesseract on Mac

For macOS, use Homebrew to install Tesseract:


To install Tesseract run this command:

brew install tesseract

tesseract Location

$ brew list tesseract


/usr/local/Cellar/tesseract/4.0.0_1/include/tesseract/ (20 files)



/usr/local/Cellar/tesseract/4.0.0_1/lib/ (2 other files)

/usr/local/Cellar/tesseract/4.0.0_1/share/tessdata/ (31 files)

Install tesseract on Ubuntu/Linux

Installing tesseract:

If you are using the Ubuntu, simply use apt-get  to install Tesseract:

$ sudo apt-get install tesseract-ocr

Verifying tesseract:

$ tesseract -v

tesseract 3.04.01


  libgif 5.1.2 : libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.8 : libwebp 0.4.4 : libopenjp2 2.1.2

Stack Trace:

$ sudo apt-get install tesseract-ocr

Reading package lists... Done

Building dependency tree       

Reading state information... Done

The following additional packages will be installed:

  liblept5 libopenjp2-7 libtesseract3 libwebp5 tesseract-ocr-eng tesseract-ocr-equ tesseract-ocr-osd

The following NEW packages will be installed:

  liblept5 libopenjp2-7 libtesseract3 libwebp5 tesseract-ocr tesseract-ocr-eng tesseract-ocr-equ tesseract-ocr-osd

0 upgraded, 8 newly installed, 0 to remove and 90 not upgraded.

Need to get 14.8 MB of archives.

After this operation, 58.1 MB of additional disk space will be used.

Do you want to continue? [Y/n] Y

Get:1 xenial-updates/universe amd64 libopenjp2-7 amd64 2.1.2-1.1+deb9u3build0.16.04.1 [112 kB]

Get:2 xenial/main amd64 libwebp5 amd64 0.4.4-1 [165 kB]

Get:3 xenial/universe amd64 liblept5 amd64 1.73-1 [872 kB]

Get:4 xenial/universe amd64 libtesseract3 amd64 3.04.01-4 [1106 kB]

Get:5 xenial/universe amd64 tesseract-ocr-eng all 3.04.00-1 [8824 kB]

Get:6 xenial/universe amd64 tesseract-ocr-osd all 3.04.00-1 [2988 kB]

Get:7 xenial/universe amd64 tesseract-ocr-equ all 3.04.00-1 [568 kB]

Get:8 xenial/universe amd64 tesseract-ocr amd64 3.04.01-4 [132 kB]

Fetched 14.8 MB in 3s (3900 kB/s)      

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = (unset),

LC_ALL = (unset),


LANG = "en_US.UTF-8"

    are supported and installed on your system.

perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

Selecting previously unselected package libopenjp2-7:amd64.

(Reading database ... 105685 files and directories currently installed.)

Preparing to unpack .../libopenjp2-7_2.1.2-1.1+deb9u3build0.16.04.1_amd64.deb ...

Unpacking libopenjp2-7:amd64 (2.1.2-1.1+deb9u3build0.16.04.1) ...

Selecting previously unselected package libwebp5:amd64.

Preparing to unpack .../libwebp5_0.4.4-1_amd64.deb ...

Unpacking libwebp5:amd64 (0.4.4-1) ...

Selecting previously unselected package liblept5.

Preparing to unpack .../liblept5_1.73-1_amd64.deb ...

Unpacking liblept5 (1.73-1) ...

Selecting previously unselected package libtesseract3.

Preparing to unpack .../libtesseract3_3.04.01-4_amd64.deb ...

Unpacking libtesseract3 (3.04.01-4) ...

Selecting previously unselected package tesseract-ocr-eng.

Preparing to unpack .../tesseract-ocr-eng_3.04.00-1_all.deb ...

Unpacking tesseract-ocr-eng (3.04.00-1) ...

Selecting previously unselected package tesseract-ocr-osd.

Preparing to unpack .../tesseract-ocr-osd_3.04.00-1_all.deb ...

Unpacking tesseract-ocr-osd (3.04.00-1) ...

Selecting previously unselected package tesseract-ocr-equ.

Preparing to unpack .../tesseract-ocr-equ_3.04.00-1_all.deb ...

Unpacking tesseract-ocr-equ (3.04.00-1) ...

Selecting previously unselected package tesseract-ocr.

Preparing to unpack .../tesseract-ocr_3.04.01-4_amd64.deb ...

Unpacking tesseract-ocr (3.04.01-4) ...

Processing triggers for libc-bin (2.23-0ubuntu10) ...

Processing triggers for man-db (2.7.5-1) ...

Setting up libopenjp2-7:amd64 (2.1.2-1.1+deb9u3build0.16.04.1) ...

Setting up libwebp5:amd64 (0.4.4-1) ...

Setting up liblept5 (1.73-1) ...

Setting up libtesseract3 (3.04.01-4) ...

Setting up tesseract-ocr-eng (3.04.00-1) ...

Setting up tesseract-ocr-osd (3.04.00-1) ...

Setting up tesseract-ocr-equ (3.04.00-1) ...

Setting up tesseract-ocr (3.04.01-4) ...

Processing triggers for libc-bin (2.23-0ubuntu10) ...

Installing Cassandra on Mac OS

Install Cassandra

Installs Apache Cassandra using Brew:

brew install cassandra

Start and Stop Cassandra

You may need to be using the below commands for start and stop.

Start Cassandra:

brew services start cassandra 

Stop Cassandra:

brew services stop cassandra