# Estimating response function dwi2response error

**URL:** https://community.mrtrix.org/t/estimating-response-function-dwi2response-error/530
**Category:** Uncategorized
**Created:** [October 24, 2016, 11:09pm UTC](https://community.mrtrix.org/t/estimating-response-function-dwi2response-error/530 "2016-10-24T23:09:29Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)
#### Post date: [October 25, 2016, 12:09am UTC](https://community.mrtrix.org/t/estimating-response-function-dwi2response-error/530/2 "2016-10-25T00:09:55Z")

</div>

Hi Saman,

Problem #1:

```auto
OSError: [Errno 2] No such file or directory: '/usr/local/bin/src/dwi2response'

```

suggests that you have manually moved the `dwi2response` script into `/usr/local/bin/`. This won’t work: The bulk of the `dwi2response` code resides in `<mrtrix3_dir>/scripts/src/dwi2response/`, and is dynamically queried & run whenever `dwi2response` is run. This keeps the code for different algorithms separate from one another, and you can even write your own response function estimation algorithm and it will automatically become available as an option in `dwi2response` (your algorithm’s options will even appear in the help page!). But because this directory can’t be found based on a _relative path_ from `dwi2response` itself, the script crashes out (I’ll add a more elegant error message). You’re better off adding `<mrtrix3_dir>/scripts/` to your `PATH` environment variable.

The second screenshot doesn’t give us enough information to know what is wrong; the better solution is to capture the entire text output and copy&paste here, wrapped in between triple back-ticks like this [for better readability](https://community.mrtrix.org/t/formatting-tricks-for-increased-readability/34/2):

````
```
sh-3.2# ./build
( 1/427) release/cmd/dwi2mask.o
( 2/427) ...
```

````

On the off chance that you updated _MRtrix3_ from a pre-March installation, there [may be additional steps needed](https://community.mrtrix.org/t/major-update-to-mrtrix3/110); e.g. you can try re-running the `configure` script prior to the `build` script.

Cheers  
Rob

---

_[View the full topic](https://community.mrtrix.org/t/estimating-response-function-dwi2response-error/530)._
