Skip to content

R and Python Detection#

Git Builders require an R or Python instance installed and available on the server. This section contains additional technical detail about how Package Manger detects available R or Python installations when those are not explicitly set in the configuration.

Detecting a valid R interpreter#

If Server.RVersion is not set, Package Manager automatically scans for R using the following approaches:

  • Version scanning: Look for R in locations known to contain multiple version installations.
  • System scanning: Look for R in locations used by system package managers.
  • Path scanning: Look for R using the PATH environment variable. Only occurs if an R location is not otherwise discovered or configured.

Package Manager will use the latest version of R that it can find on the system.

Version scanning#

Package Manager can scan directories that often contain multiple R installations:

  • /opt/R
  • /opt/local/R

Any child directory that contains an R installation will be discovered.

For example, any of the following installed versions of R will be automatically detected:

  • /opt/R/3.1.3/bin/R
  • /opt/R/3.2.4/bin/R
  • /opt/R/3.4.2-optimized-build/bin/R
  • /opt/local/R/3.3.1/bin/R

Note

Symbolic links from any of these scan locations to alternate locations are permitted.

System scanning#

Package Manager can scan each of the following directories to determine if they contain an R executable:

  • /usr/lib/R
  • /usr/lib64/R
  • /usr/local/lib/R
  • /usr/local/lib64/R
  • /opt/local/lib/R
  • /opt/local/lib64/R

Each of these locations that contains an R installation will be discovered.

PATH scanning#

Package Manager can use the PATH environment variable to discover R if one is not otherwise found.

Detecting a valid Python interpreter#

If Server.PythonVersion is not set then Package Manager automatically looks for python or python3 with the build and virtualenv packages, if available. Package Manager will scan the following items:

  • /opt/python/*/bin
  • The PATH environment variable

Package Manager will prioritize the highest available version of python or python3 with build and virtualenv, even if a newer version of Python without those packages is available.

If no python or python3 with both build and virtualenv is detected, Package Manager will automatically set the newest available version of Python.

Note

Symbolic links from any of these scan locations to alternate locations are permitted.