Skip to main content

Find or install Julia

Project description

find_julia

This Python package provides functions for searching the file system for the path to a Julia executable or installing Julia if none is found. It is meant to be used by other Python projects that need to find a Julia installation. It also may be used interactively.

Install

pip install find_julia

Several locations are searched for Julia installations, including the default locations used by jill.py and by juliaup.

Examples

Simplest use

Find julia

In [1]: from find_julia import find

In [2]: find()
Out[2]: '/usr/bin/julia'

Find or install julia

In [1]: from find_julia import find_or_install

In [2]: find_or_install()
Out[2]: '/usr/bin/julia'

Function find

find(version_spec=None, check_exe=False, find_all=False, strict=False, env_var=None, no_dist=True)

Calling find() will use reasonable defaults.

Parameters

  • env_var : The environment variable to check for a julia path. If this variable is set and the exectuable satisfies version_spec, then it will be preferred to all other paths. Default: "JULIA".
  • version_spec : A Julia compatibility version specification as a str or object. The returned executable must satisfy this specification. Default: "^1".
  • strict : If True then prerelease (development) versions will be excluded.
  • check_exe : If True then check that the path is a Julia by querying it for the version. Note that this has already been done for most Julias found when the version was extracted.
  • find_all : If False skip the locations that are slower to search. If no other exectuables are found, the slower locations may be searched anyway. The only slow location is the jill-installed location.
  • no_dist : bool If True exclude julia installed from linux distribution packages. These are usually broken. Default True. This looks in /usr/bin/julia and /usr/sbin/julia.

Function find_or_install

find_or_install(version_spec=None, check_exe=False, find_all=False, strict=False,
                    answer_yes=False, post_question_hook=None,
                    env_var=None, no_dist=True)

Calling find_or_install() will use reasonable defaults.

This function takes all the same parameters as does find as well as the following.

Parameters

  • answer_yes - if True, then ask no questions, assume answers are "yes".
  • post_question_hook - a function to run if and after the consumer is asked whether to install Julia. This can be used to ask and record more questions rather than waiting till after the download. Default: None

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

find_julia-0.3.0.tar.gz (10.4 kB view details)

Uploaded Source

File details

Details for the file find_julia-0.3.0.tar.gz.

File metadata

  • Download URL: find_julia-0.3.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for find_julia-0.3.0.tar.gz
Algorithm Hash digest
SHA256 399927a1ab1ed672d30afdff1ed44525a1db38a05eedb2e637a80c319bd24038
MD5 dd38d5706b1efa8906bf3a8f9826a0a5
BLAKE2b-256 997e7af5128d81e90061462e9e4d55b2255c73d70b41047e7b17f61e94f5a8dd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page