Julia

From GHER

(Difference between revisions)
Jump to: navigation, search
(Package management)
(Blanked the page)
 
(One intermediate revision not shown)
Line 1: Line 1:
-
Home page: http://julialang.org/
 
-
Source code: https://github.com/JuliaLang/julia
 
-
 
-
== Installation ==
 
-
 
-
=== Proposed installation ===
 
-
 
-
Julia: http://julialang.org/downloads/
 
-
 
-
Anaconda: https://www.continuum.io/downloads
 
-
 
-
Then via
 
-
  Pkg.add("IJulia")
 
-
 
-
etc in Julia add
 
-
  IJulia, Plots, Interpolations, PyPlot
 
-
 
-
=== From source ===
 
-
 
-
git clone git@github.com:JuliaLang/julia.git
 
-
git checkout release-0.5
 
-
make
 
-
 
-
* release-0.5 may have to be adapted, according to the most recent stable version.
 
-
* '''make''' can take a while (i.e., hours) to be completed.
 
-
 
-
You need to have a recent version of [https://cmake.org/download/ cmake].
 
-
 
-
=== Package management ===
 
-
 
-
* Summary of the packages installed:
 
-
Pkg.status()
 
-
* Summary, in dictionnary form:
 
-
Pkg.installed()
 
-
* Add new:
 
-
Pkg.add(NewPackageName)
 
-
* Install from github:
 
-
Pkg.clone(URL);
 
-
* Get the latest versions of your packages:
 
-
Pkg.update()
 
-
 
-
== Running Julia ==
 
-
 
-
=== Command line ===
 
-
 
-
Open a terminal and type
 
-
julia
 
-
now issue the Julia commands:
 
-
julia> exp(sin(pi))
 
-
1.0000000000000002
 
-
 
-
=== Notebook ===
 
-
 
-
Check this page: https://github.com/JuliaLang/IJulia.jl
 
-
 
-
In terminal, start Julia then type
 
-
julia> Pkg.add("IJulia")
 
-
Next time you launch a jupyter notebook, the Julia kernel corresponding to your Julia version will appear.
 
-
Other possibility: directly from Julia terminal:
 
-
julia> using IJulia
 
-
julia> notebook()
 
-
 
-
== To use divand ==
 
-
 
-
If you want to use [https://github.com/gher-ulg/divand.jlhttps://github.com/gher-ulg/divand.jl divand]
 
-
 
-
  Pkg.clone("https://github.com/gher-ulg/divand.jl")
 
-
 
-
or if you have a local working/development copy
 
-
 
-
  Pkg.clone("divand")
 
-
 
-
 
-
Alex's introduction to Julia with Jupyter:
 
-
 
-
http://tinyurl.com/juliatut
 
-
 
-
== Recommanded packages ==
 
-
 
-
General documentation for the packages: http://docs.julialang.org/en/release-0.4/manual/packages/
 
-
 
-
* [https://github.com/kmsquire/Logging.jl logging]
 
-
* [https://github.com/JuliaGeo/NetCDF.jl netCDF]
 
-
 
-
== Troubleshooting ==
 
-
 
-
=== Using PyPlot ===
 
-
 
-
'''Error message:'''
 
-
 
-
The pyimport exception was: PyError (:PyImport_ImportModule) <type 'exceptions.ImportError'>
 
-
ImportError('No module named matplotlib',)
 
-
 
-
'''Origin:''' it seems Julia is looking for matplotlib in Python2.7. In my case I had it installed only with Python3.6.
 
-
 
-
'''Solution''':
 
-
pip2.7 install matplotlib
 

Latest revision as of 08:26, 27 June 2017

Personal tools