jitty-scripts/julia-0.6.2/share/doc/julia/html/en/manual/environment-variables.html

14 lines
27 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Environment Variables · The Julia Language</title><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-28835595-6', 'auto');
ga('send', 'pageview');
</script><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link href="../assets/highlightjs/default.css" rel="stylesheet" type="text/css"/><link href="../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><a href="../index.html"><img class="logo" src="../assets/logo.png" alt="The Julia Language logo"/></a><h1>The Julia Language</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" action="../search.html"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../index.html">Home</a></li><li><span class="toctext">Manual</span><ul><li><a class="toctext" href="introduction.html">Introduction</a></li><li><a class="toctext" href="getting-started.html">Getting Started</a></li><li><a class="toctext" href="variables.html">Variables</a></li><li><a class="toctext" href="integers-and-floating-point-numbers.html">Integers and Floating-Point Numbers</a></li><li><a class="toctext" href="mathematical-operations.html">Mathematical Operations and Elementary Functions</a></li><li><a class="toctext" href="complex-and-rational-numbers.html">Complex and Rational Numbers</a></li><li><a class="toctext" href="strings.html">Strings</a></li><li><a class="toctext" href="functions.html">Functions</a></li><li><a class="toctext" href="control-flow.html">Control Flow</a></li><li><a class="toctext" href="variables-and-scoping.html">Scope of Variables</a></li><li><a class="toctext" href="types.html">Types</a></li><li><a class="toctext" href="methods.html">Methods</a></li><li><a class="toctext" href="constructors.html">Constructors</a></li><li><a class="toctext" href="conversion-and-promotion.html">Conversion and Promotion</a></li><li><a class="toctext" href="interfaces.html">Interfaces</a></li><li><a class="toctext" href="modules.html">Modules</a></li><li><a class="toctext" href="documentation.html">Documentation</a></li><li><a class="toctext" href="metaprogramming.html">Metaprogramming</a></li><li><a class="toctext" href="arrays.html">Multi-dimensional Arrays</a></li><li><a class="toctext" href="linear-algebra.html">Linear algebra</a></li><li><a class="toctext" href="networking-and-streams.html">Networking and Streams</a></li><li><a class="toctext" href="parallel-computing.html">Parallel Computing</a></li><li><a class="toctext" href="dates.html">Date and DateTime</a></li><li><a class="toctext" href="interacting-with-julia.html">Interacting With Julia</a></li><li><a class="toctext" href="running-external-programs.html">Running External Programs</a></li><li><a class="toctext" href="calling-c-and-fortran-code.html">Calling C and Fortran Code</a></li><li><a class="toctext" href="handling-operating-system-variation.html">Handling Operating System Variation</a></li><li class="current"><a class="toctext" href="environment-variables.html">Environment Variables</a><ul class="internal"><li><a class="toctext" href="#File-locations-1">File locations</a></li><li><a class="toctext" href="#External-applications-1">External applications</a></li><li><a class="toctext" href="#Parallelization-1">Parallelization</a></li><li><a class="toctext" href="#REPL-formatting-1">REPL formatting</a></li><li><a class="toctext" href="#Debugging-and-profiling-1">Debugging and profiling</a></li></ul></li><li><a class="toctext" href="embedding.html">Embedding Julia</a></li><li><a class="toctext" href="packages.html">Packages</a></li><li><a class="toctext" href="profile.html">
$JULIA_HOME/julia-debug</code></pre><p>by default.</p><p>The global variable <code>Base.DATAROOTDIR</code> determines a relative path from <code>Base.JULIA_HOME</code> to the data directory associated with Julia. Then the path</p><pre><code class="language-none">$JULIA_HOME/$DATAROOTDIR/julia/base</code></pre><p>determines the directory in which Julia initially searches for source files (via <code>Base.find_source_file()</code>).</p><p>Likewise, the global variable <code>Base.SYSCONFDIR</code> determines a relative path to the configuration file directory. Then Julia searches for a <code>juliarc.jl</code> file at</p><pre><code class="language-none">$JULIA_HOME/$SYSCONFDIR/julia/juliarc.jl
$JULIA_HOME/../etc/julia/juliarc.jl</code></pre><p>by default (via <code>Base.load_juliarc()</code>).</p><p>For example, a Linux installation with a Julia executable located at <code>/bin/julia</code>, a <code>DATAROOTDIR</code> of <code>../share</code>, and a <code>SYSCONFDIR</code> of <code>../etc</code> will have <code>JULIA_HOME</code> set to <code>/bin</code>, a source-file search path of</p><pre><code class="language-none">/share/julia/base</code></pre><p>and a global configuration search path of</p><pre><code class="language-none">/etc/julia/juliarc.jl</code></pre><h3><a class="nav-anchor" id="JULIA_LOAD_PATH-1" href="#JULIA_LOAD_PATH-1"><code>JULIA_LOAD_PATH</code></a></h3><p>A separated list of absolute paths that are to be appended to the variable <a href="../stdlib/constants.html#Base.LOAD_PATH"><code>LOAD_PATH</code></a>. (In Unix-like systems, the path separator is <code>:</code>; in Windows systems, the path separator is <code>;</code>.) The <code>LOAD_PATH</code> variable is where <a href="../stdlib/base.html#Base.require"><code>Base.require</code></a> and <code>Base.load_in_path()</code> look for code; it defaults to the absolute paths</p><pre><code class="language-none">$JULIA_HOME/../local/share/julia/site/v$(VERSION.major).$(VERSION.minor)
$JULIA_HOME/../share/julia/site/v$(VERSION.major).$(VERSION.minor)</code></pre><p>so that, e.g., version 0.6 of Julia on a Linux system with a Julia executable at <code>/bin/julia</code> will have a default <code>LOAD_PATH</code> of</p><pre><code class="language-none">/local/share/julia/site/v0.6
/share/julia/site/v0.6</code></pre><h3><a class="nav-anchor" id="JULIA_PKGDIR-1" href="#JULIA_PKGDIR-1"><code>JULIA_PKGDIR</code></a></h3><p>The path of the parent directory <code>Pkg.Dir._pkgroot()</code> for the version-specific Julia package repositories. If the path is relative, then it is taken with respect to the working directory. If <code>$JULIA_PKGDIR</code> is not set, then <code>Pkg.Dir._pkgroot()</code> defaults to</p><pre><code class="language-none">$HOME/.julia</code></pre><p>Then the repository location <a href="../stdlib/pkg.html#Base.Pkg.dir"><code>Pkg.dir</code></a> for a given Julia version is</p><pre><code class="language-none">$JULIA_PKGDIR/v$(VERSION.major).$(VERSION.minor)</code></pre><p>For example, for a Linux user whose home directory is <code>/home/alice</code>, the directory containing the package repositories would by default be</p><pre><code class="language-none">/home/alice/.julia</code></pre><p>and the package repository for version 0.6 of Julia would be</p><pre><code class="language-none">/home/alice/.julia/v0.6</code></pre><h3><a class="nav-anchor" id="JULIA_HISTORY-1" href="#JULIA_HISTORY-1"><code>JULIA_HISTORY</code></a></h3><p>The absolute path <code>Base.REPL.find_hist_file()</code> of the REPL&#39;s history file. If <code>$JULIA_HISTORY</code> is not set, then <code>Base.REPL.find_hist_file()</code> defaults to</p><pre><code class="language-none">$HOME/.julia_history</code></pre><h3><a class="nav-anchor" id="JULIA_PKGRESOLVE_ACCURACY-1" href="#JULIA_PKGRESOLVE_ACCURACY-1"><code>JULIA_PKGRESOLVE_ACCURACY</code></a></h3><p>A positive <code>Int</code> that determines how much time the max-sum subroutine <code>MaxSum.maxsum()</code> of the package dependency resolver <a href="../stdlib/pkg.html#Base.Pkg.resolve"><code>Base.Pkg.resolve</code></a> will devote to attempting satisfying constraints before giving up: this value is by default <code>1</code>, and larger values correspond to larger amounts of time.</p><p>Suppose the value of <code>$JULIA_PKGRESOLVE_ACCURACY</code> is <code>n</code>. Then</p><ul><li><p>the number of pre-decimation iterations is <code>20*n</code>,</p></li><li><p>the number of iterations between decimation steps is <code>10*n</code>, and</p></li><li><p>at decimation steps, at most one in every <code>20*n</code> packages is decimated.</p></li></ul><h2><a class="nav-anchor" id="External-applications-1" href="#External-applications-1">External applications</a></h2><h3><a class="nav-anchor" id="JULIA_SHELL-1" href="#JULIA_SHELL-1"><code>JULIA_SHELL</code></a></h3><p>The absolute path of the shell with which Julia should execute external commands (via <code>Base.repl_cmd()</code>). Defaults to the environment variable <code>$SHELL</code>, and falls back to <code>/bin/sh</code> if <code>$SHELL</code> is unset.</p><div class="admonition note"><div class="admonition-title">Note</div><div class="admonition-text"><p>On Windows, this environment variable is ignored, and external commands are executed directly.</p></div></div><h3><a class="nav-anchor" id="JULIA_EDITOR-1" href="#JULIA_EDITOR-1"><code>JULIA_EDITOR</code></a></h3><p>The editor returned by <code>Base.editor()</code> and used in, e.g., <a href="../stdlib/base.html#Base.edit-Tuple{AbstractString,Integer}"><code>Base.edit</code></a>, referring to the command of the preferred editor, for instance <code>vim</code>.</p><p><code>$JULIA_EDITOR</code> takes precedence over <code>$VISUAL</code>, which in turn takes precedence over <code>$EDITOR</code>. If none of these environment variables is set, then the editor is taken to be <code>open</code> on Windows and OS X, or <code>/etc/alternatives/editor</code> if it exists, or <code>emacs</code> otherwise.</p><div class="admonition note"><div class="admonition-title">Note</div><div class="admonition-text"><p><code>$JULIA_EDITOR</code> is <em>not</em> used in the determination of the editor for <a href="../stdlib/pkg.html#Base.Pkg.edit"><code>Base.Pkg.edit</code></a>: this function checks <code>$VISUAL</code> and <code>$EDITOR</code> alone.</p></div></div><h2><a class="nav-anc