# Installation of DPU (Python Scripts) for OSX

**URL:** <https://www.evolver.bio/t/installation-of-dpu-python-scripts-for-osx/128>\
**Category:** Getting Started\
**Created:** [August 18, 2019, 5:55pm UTC](https://www.evolver.bio/t/installation-of-dpu-python-scripts-for-osx/128 "2019-08-18T17:55:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/www.evolver.bio/bgwong/32/262_2.png) [@bgwong](https://www.evolver.bio/u/bgwong)\
**Post date:** [August 18, 2019, 5:55pm UTC](https://www.evolver.bio/t/installation-of-dpu-python-scripts-for-osx/128/1 "2019-08-18T17:55:02Z")

</div>

# **Tutorial Goal:**

The goal of this tutorial is to run through the setup scripts to install the data processing unit (DPU) to control eVOLVER system for OSX computers.

**What is the DPU?:** The DPU consists of simple python scripts that uses web-sockets to interface with the the eVOLVER to run the code. Web-sockets is a type of protocol that talks to the system in a reliable way. For more information how the eVOLVER server works (what is running on the actual eVOLVER), please check out our [github repository](https://github.com/FYNCH-BIO/evolver).

**What are we doing in this tutorial?:**

- **Downloading the Git repo** - We put all our code for the public on Github.

- **Installation of Python 3.6** - So far, our system relies on a library that runs on Python 3.6. We plan on updating that but, unfortunately for now, you will need to install Python 3.6 in this tutorial.

- **Installation of Homebrew** - Homebrew is a way to install programs easier. We will use this to install all the necessary programs

- **Installation of Python Libraries**

# Tutorial

## **1) Downloading Git Repo**

Download the most recent version of the DPU repo here: [https://github.com/FYNCH-BIO/dpu](https://github.com/FYNCH-BIO/dpu)

Unzip and place in directory that you want to keep the code in. I would avoid putting the code on a synced folder (like Dropbox or Google Drive), the syncing sometimes can’t catch up with the frequency of file updates (every 10 seconds).

## **2) Change the directory to where you placed the folder**

For mac users you want to type this into the terminal (list of basic commands [here](https://macpaw.com/how-to/use-terminal-on-mac)):  
`cd your_directory/dpu/`

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/evolver/original/1X/b5762d60de136f761c622933121505ecc5ca4fbd.png)

## **3) Install necessary Programs and Files**

For Mac users, install Homebrew and Python 3.6 with these commands in Terminal:

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

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/evolver/original/1X/182730a2140a058810dc34c351cada7b7355f40e.png)  
**Install Python3.6 and Necessary Libraries**  
`brew install --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb`

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/evolver/original/1X/6654cfe8abad52eda079f9ba0622202c29799fdb.jpeg)

`brew install openssl`

`brew install sqlite`

## **4) Install necessary Python Dependencies**

If you are in the correct directory, there should be a script named setup.py in the directory. List the content of the directory using the `ls` command.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/evolver/original/1X/3c7c45df597b3d0d2facbba4ab22b67c35739af6.jpeg)

**Run the setup script to install the dependencies:**

`python3.6 setup.py install`

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/evolver/original/1X/540280ea22c976ef3b501d37b4f8f85287a80bef.jpeg)

That’s it! You are now ready to run your first eVOLVER script!

---

<div class="post-metadata">

**Author:** ![erouviere](https://avatars.discourse-cdn.com/v4/letter/e/f17d59/32.png) [@erouviere](https://www.evolver.bio/u/erouviere)\
**Post date:** [October 18, 2020, 2:50am UTC](https://www.evolver.bio/t/installation-of-dpu-python-scripts-for-osx/128/2 "2020-10-18T02:50:15Z")

</div>

I’m getting an error on step “ **Install Python3.6 and Necessary Libraries** ”.

```
$ brew install --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb

Error: Calling Installation of python from a GitHub commit URL is disabled! Use 'brew extract python' to stable tap on GitHub instead.

```

I’m guessing this is coming from a homebrew update. Any work arounds?

---

<div class="post-metadata">

**Author:** ![bgwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/www.evolver.bio/bgwong/32/262_2.png) [@bgwong](https://www.evolver.bio/u/bgwong)\
**Post date:** [October 18, 2020, 3:50am UTC](https://www.evolver.bio/t/installation-of-dpu-python-scripts-for-osx/128/3 "2020-10-18T03:50:17Z")

</div>

The DPU actually doesnt have to rely on python 3.6 any version of python 3 should work. Does the normal installation work? Like the command below.

`brew install python`

---

<div class="post-metadata">

**Author:** ![erouviere](https://avatars.discourse-cdn.com/v4/letter/e/f17d59/32.png) [@erouviere](https://www.evolver.bio/u/erouviere)\
**Post date:** [October 19, 2020, 4:04pm UTC](https://www.evolver.bio/t/installation-of-dpu-python-scripts-for-osx/128/4 "2020-10-19T16:04:21Z")

</div>

Thanks, reinstalling python3 fixed my problems!
