# Error installing ImageView Library

**URL:** <https://discourse.julialang.org/t/error-installing-imageview-library/33976>\
**Category:** New to Julia\
**Created:** [January 30, 2020, 1:07pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976 "2020-01-30T13:07:25Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![samantp](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@samantp](https://discourse.julialang.org/u/samantp)\
**Post date:** [January 30, 2020, 1:07pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/1 "2020-01-30T13:07:26Z")

</div>

I work in medical imaging and am therefore trying to install the ImageView Library, but I am getting an error when I build it, as follows (sorry this is a bit lengthy but I have no idea what is important and what is not). Does anyone know how to fix this issue? thanks

 ![Screenshot from 2020-01-30 15-40-25](https://global.discourse-cdn.com/julialang/original/3X/6/f/6f0c931382d2d8c7954940be7e182eaaac8afb41.png)  
Error: Error building `Cairo`:  
│ sudo: no tty present and no askpass program specified  
│ ERROR: LoadError: failed process: Process(`sudo apt-get install gettext`, ProcessExited(1)) [1]  
│ Stacktrace:  
│ [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42  
│ [2] pipeline\_error at ./process.jl:705 [inlined]  
│ [3] #run#505(::Bool, ::Function, ::Cmd) at ./process.jl:663  
│ [4] run(::Cmd) at ./process.jl:661  
│ [5] run(::BinDeps.SynchronousStepCollection) at /home/pratiksamant/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:521  
│ [6] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /home/pratiksamant/.julia/packages/BinDeps/ZEval/src/dependencies.jl:944  
│ [7] satisfy!(::BinDeps.LibraryGroup, ::Array{DataType,1}) at /home/pratiksamant/.julia/packages/BinDeps/ZEval/src/dependencies.jl:910  
│ [8] satisfy!(::BinDeps.LibraryGroup) at /home/pratiksamant/.julia/packages/BinDeps/ZEval/src/dependencies.jl:874  
│ [9] top-level scope at /home/pratiksamant/.julia/packages/BinDeps/ZEval/src/dependencies.jl:977  
│ [10] include at ./boot.jl:317 [inlined]  
│ [11] include\_relative(::Module, ::String) at ./loading.jl:1044  
│ [12] include(::Module, ::String) at ./sysimg.jl:29  
│ [13] include(::String) at ./client.jl:392  
│ [14] top-level scope at none:0  
│ in expression starting at /home/pratiksamant/.julia/packages/Cairo/p68X8/deps/build.jl:176  
│ Installing dependency gettext via `sudo apt-get install gettext`:  
└ @ Pkg.Operations /buildworker/worker/package\_linux32/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1096

---

<div class="post-metadata">

**Author:** ![samantp](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@samantp](https://discourse.julialang.org/u/samantp)\
**Post date:** [January 30, 2020, 1:07pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/2 "2020-01-30T13:07:57Z")

</div>

I also have this error:

Error: Error building `Gtk`:  
│ sudo: no tty present and no askpass program specified  
│ ERROR: LoadError: failed process: Process(`sudo apt-get install libgtk-3-dev`, ProcessExited(1)) [1]  
│ Stacktrace:  
│ [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42  
│ [2] pipeline\_error at ./process.jl:705 [inlined]  
│ [3] #run#505(::Bool, ::Function, ::Cmd) at ./process.jl:663  
│ [4] run(::Cmd) at ./process.jl:661  
│ [5] run(::BinDeps.SynchronousStepCollection) at /home/pratiksamant/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:521  
│ [6] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /home/pratiksamant/.julia/packages/BinDeps/ZEval/src/dependencies.jl:944  
│ [7] satisfy!(::BinDeps.LibraryGroup, ::Array{DataType,1}) at /home/pratiksamant/.julia/packages/BinDeps/ZEval/src/dependencies.jl:910  
│ [8] satisfy!(::BinDeps.LibraryGroup) at /home/pratiksamant/.julia/packages/BinDeps/ZEval/src/dependencies.jl:874  
│ [9] top-level scope at /home/pratiksamant/.julia/packages/BinDeps/ZEval/src/dependencies.jl:977  
│ [10] include at ./boot.jl:317 [inlined]  
│ [11] include\_relative(::Module, ::String) at ./loading.jl:1044  
│ [12] include(::Module, ::String) at ./sysimg.jl:29  
│ [13] include(::String) at ./client.jl:392  
│ [14] top-level scope at none:0  
│ in expression starting at /home/pratiksamant/.julia/packages/Gtk/mVhmL/deps/build.jl:63  
│ Installing dependency libgtk-3-dev via `sudo apt-get install libgtk-3-dev`:  
└ @ Pkg.Operations /buildworker/worker/package\_linux32/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1096

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [January 30, 2020, 1:19pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/3 "2020-01-30T13:19:35Z")

</div>

What happens when you try to install something from the terminal, e.g. `sudo apt-get install libgtk-3-dev`?

Also, please quote your code: [Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757)

---

<div class="post-metadata">

**Author:** ![samantp](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@samantp](https://discourse.julialang.org/u/samantp)\
**Post date:** [January 30, 2020, 3:49pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/4 "2020-01-30T15:49:15Z")

</div>

Oh, sorry, I have added a screenshot of my code. I have tried running that command from the terminal, it installed something (I assume libgtk-3-dev) but I still get the exact same error.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [January 30, 2020, 4:25pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/5 "2020-01-30T16:25:51Z")

</div>

Hello @samantp at the moment I work with a company which is applying Machine Learning to mammography. Interesting stuff… but a Python shop!  
May I ask what work you are doing in medical imaging?  
Also are you running Julia in some sort of VM?

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [January 30, 2020, 4:31pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/6 "2020-01-30T16:31:00Z")

</div>

> [@samantp](#):
>
> sudo: no tty present and no askpass program specified

I think this is the clue - which is why I ask you about the setup you have. How are you logging in?  
With Julia 1.0.3 on Ubuntu 18.04 I am able to add the ImageView package - actually it is still building.  
This is on my own laptop though, no VM or Docker image

---

<div class="post-metadata">

**Author:** ![samantp](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@samantp](https://discourse.julialang.org/u/samantp)\
**Post date:** [January 30, 2020, 4:34pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/7 "2020-01-30T16:34:34Z")

</div>

I am trying to use Machine learning in analysing MR linac images. I am running Julia 1.04 via Jupyter notebook in Ubuntu 18.04. I have tried building the package just by launching julia through my ubuntu terminal but I get the same error message unfortunately.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [January 30, 2020, 4:39pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/8 "2020-01-30T16:39:14Z")

</div>

Plese try thse commands at the REPL  
julia\> run(`date`)

julia\> run(`sudo date`)

Also in my ignoramce… I know what an MRI scanner is… and what a Linac is…  
What the heck is an MR Linac?

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [January 30, 2020, 4:41pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/9 "2020-01-30T16:41:47Z")

</div>

Also at your terminal prompt just:  
sudo date

You may be interested to know that I worked in conformational radiotherapy a looooooonnnnggg time ago.  
Programming in Fortran on a Sun workstation with 2 Mbytes - yes Mbytes- of RAM.  
A simple 2D program was difficult to run. I Was trying to use simulated annealing.

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [January 31, 2020, 12:36am UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/10 "2020-01-31T00:36:17Z")

</div>

If you can use Julia 1.3 the installation mechanism is completely different and should not require `sudo`.

---

<div class="post-metadata">

**Author:** ![samantp](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@samantp](https://discourse.julialang.org/u/samantp)\
**Post date:** [January 31, 2020, 10:05am UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/11 "2020-01-31T10:05:44Z")

</div>

Just the sum of its components 🙂 it’s a Linac with an integrated MR scanner: [MR-LINAC image-guided radiotherapy](https://www.philips.co.uk/healthcare/education-resources/publications/hotspot/mr-linac)

Unfortunately both commands return errors:  
julia\> run(date)  
ERROR: UndefVarError: date not defined  
Stacktrace:  
[1] top-level scope at none:0

julia\> run(sudo date)  
ERROR: syntax: missing comma or ) in argument list

---

<div class="post-metadata">

**Author:** ![samantp](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@samantp](https://discourse.julialang.org/u/samantp)\
**Post date:** [January 31, 2020, 10:08am UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/12 "2020-01-31T10:08:23Z")

</div>

Ooof, sounds rough! How the times have changed 🙂

---

<div class="post-metadata">

**Author:** ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)\
**Post date:** [January 31, 2020, 11:01am UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/13 "2020-01-31T11:01:48Z")

</div>

You need to use ``` to create a runnable command:

```julia
julia> run(date)
ERROR: UndefVarError: date not defined
Stacktrace:
 [1] top-level scope at REPL[51]:1

julia> run(`date`)
Fr Jän 31 11:59:01 CET 2020
Process(`date`, ProcessExited(0))

```

---

<div class="post-metadata">

**Author:** ![samantp](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@samantp](https://discourse.julialang.org/u/samantp)\
**Post date:** [January 31, 2020, 12:15pm UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/14 "2020-01-31T12:15:54Z")

</div>

I believe I have found a solution for this issue, the version of Julia I was using was 1.0.3, I have uninstalled this and instead started on 1.3.1 and ImageView works without issue. I think that ImageView is not compatible with older versions of Julia. Thanks to all responses who tried to help! I guess I should have mentioned the Julia version, apologies!

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [February 1, 2020, 8:08am UTC](https://discourse.julialang.org/t/error-installing-imageview-library/33976/15 "2020-02-01T08:08:02Z")

</div>

Glad it works now.

For most non-mac people ImageView works fine on Julia 1.0.x. As I said above ([Error installing ImageView Library - #10 by tim.holy](https://discourse.julialang.org/t/error-installing-imageview-library/33976/10)), prior to Julia 1.3 it does require `sudo`, and that seemed to be where you were having trouble.
