Julia: Difference between revisions

Jump to navigation Jump to search
Marked this version for translation
No edit summary
(Marked this version for translation)
Line 68: Line 68:
Code that runs in Julia 0.7 without warnings should be compatible with Julia 1.0.
Code that runs in Julia 0.7 without warnings should be compatible with Julia 1.0.


= Using PyCall.jl to call Python from Julia =
= Using PyCall.jl to call Python from Julia = <!--T:40-->


<!--T:41-->
Julia can interface with Python code using PyCall.jl. When using PyCall.jl, set the <code>PYTHON</code> environment variable to the python executable in your virtual Python environment. On our clusters, we recommend using virtual Python environments as described in our [[Python]] documentation. After activating a virtual Python environment, you can use it in PyCall.jl:
Julia can interface with Python code using PyCall.jl. When using PyCall.jl, set the <code>PYTHON</code> environment variable to the python executable in your virtual Python environment. On our clusters, we recommend using virtual Python environments as described in our [[Python]] documentation. After activating a virtual Python environment, you can use it in PyCall.jl:


  $ source "$HOME/myenv/bin/activate"
  <!--T:42-->
$ source "$HOME/myenv/bin/activate"
  (myenv) $ julia
  (myenv) $ julia
  [...]
  [...]
Line 79: Line 81:
  julia> Pkg.build("PyCall")
  julia> Pkg.build("PyCall")


<!--T:43-->
We strongly advise against the default PyCall.jl behaviour, which is to use a Miniconda distribution inside your Julia environment. Anaconda and similar distributions [[Anaconda | are not suitable on our clusters]].
We strongly advise against the default PyCall.jl behaviour, which is to use a Miniconda distribution inside your Julia environment. Anaconda and similar distributions [[Anaconda | are not suitable on our clusters]].


<!--T:44-->
See the [https://github.com/JuliaPy/PyCall.jl PyCall.jl documentation] for details.
See the [https://github.com/JuliaPy/PyCall.jl PyCall.jl documentation] for details.


rsnt_translations
56,420

edits

Navigation menu