How to use packages in Julia Studio
Asked Answered
H

2

6

I can't get the package system to work in Julia Studio. For example if I want to plot a simple graph I've tried double clicking the Winston package which seems to install from the Git repo, then:

using Winston
plot([1 2 3],[3 2 6])

But I get the error:

could not open file /Applications/JuliaStudio.app/Contents/Resources/juliaengine/Winston.jl

Which looks like Julia is looking in the wrong directory. How should I set up Julia Studio to correctly work with the packages?

Response to Adam: thanks, unfortunately there seem to be a few issues. When I try to remove/add the Winston package I get a message like:

julia> Pkg.rm("Winston")
ERROR: Unknown dependency for ODBC: julia
in dependencies at pkg/metadata.jl:156
in ReqsStruct at pkg/resolve.jl:65
in resolve at pkg/resolve.jl:1162
in _resolve at pkg.jl:230
in anonymous at no file:163
in cd at file.jl:26
in cd_pkgdir at pkg.jl:34
in rm at pkg.jl:141
in rm at pkg.jl:165

I'll spend some more time on this and try and work out what's going on. I'll post an update for completeness if I get anywhere.

UPDATE I'm now up to Julia Studio version 0.4.4 and after updating the packages the original example works. Unfortunately I can't determine the original problem but it looks like a complex dependency or version issue.

Haiphong answered 7/3, 2013 at 15:33 Comment(3)
I've had the same problem :( Except I seem to get it for every package (e.g. I can't get Calculus to work, and it has no dependencies). The work around isn't working for me either, so any help would be greatly appreciated :)Blackfoot
@tom, I added a new answer.Astri
I get the following error: Unknown dependency for GARCH: NLoptPham
O
5

I think it's related to this issue: https://github.com/forio/julia-studio/issues/83

The Winston installation requires external dependencies and prompts you for your input on how you want to install them. Julia Studio doesn't allow you to respond to this input.

Here's the workaround:

In your console, enter:

/Applications/JuliaStudio.app/julia/bin/julia-release-readline

Then

Pkg.rm("Winston")
Pkg.add("Winston")

Follow the prompts and when it's done close the process and return to Julia Studio.

Winston should now be working.

Oast answered 7/3, 2013 at 23:47 Comment(0)
A
2

This is what I did:

  1. Remove the $HOME/.julia folder (this will also erase all previously installed packages)
  2. Run from a terminal/console

    Last login: Sat Jul 27 02:58:06 on ttys001
    ~  ᐅ /Applications/JuliaStudio.app/julia/bin/julia-release-readline
               _
       _       _ _(_)_     |  A fresh approach to technical computing
      (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
       _ _   _| |_  __ _   |  Type "help()" to list help topics
      | | | | | | |/ _` |  |
      | | |_| | | | (_| |  |  Version 0.1.2+111981303.ra703.dirty
     _/ |\__'_|_|_|\__'_|  |  Commit a703335d02 (2013-03-10 22:34:09)*
    |__/                   |
    
    julia> 
    
  3. Install the package

    julia> Pkg.add("Winston")
    MESSAGE: Auto-initializing default package repository /Users/elyase/.julia.
               ...
    

It works!

Astri answered 27/7, 2013 at 11:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.