Giter Site home page Giter Site logo

conda.jl's Introduction

Conda.jl

Build Status -- OS X and Linux Build status -- Windows

This package allows one to use conda as a cross-platform binary provider for Julia for other Julia packages, especially to install binaries that have complicated dependencies like Python.

conda is a package manager which started as the binary package manager for the Anaconda Python distribution, but it also provides arbitrary packages. Instead of the full Anaconda distribution, Conda.jl uses the miniconda Python environment, which only includes conda and its dependencies.

Basic functionality

At the julia> prompt, type a ] (close square bracket) to get a Julia package prompt pkg>, where you can type add Conda to install this package.

Once Conda is installed, you can run import Conda to load the package and run a variety of package-management functions:

  • Conda.add(package, env; channel=""): install a package from a specified channel (optional);
  • Conda.rm(package, env): remove (uninstall) a package;
  • Conda.update(env): update all installed packages to the latest version;
  • Conda.list(env): list all installed packages.
  • Conda.add_channel(channel, env): add a channel to the list of channels;
  • Conda.channels(env): get the current list of channels;
  • Conda.rm_channel(channel, env): remove a channel from the list of channels;

The parameter env is optional and defaults to ROOTENV. See below for more info.

Conda environments

Conda environments allow you to manage multiple distinct sets of packages in a way that avoids conflicts and allows you to install different versions of packages simultaneously.

The Conda.jl package supports environments by allowing you to pass an optional env parameter to functions for package installation, update, and so on. If this parameter is not specified, then the default "root" environment (corresponding to the path in Conda.ROOTENV) is used. The environment name can be specified as a Symbol, or the full path of the environment (if you want to use an environment in a nonstandard directory) can be passed as a string.

For example:

using Conda
Conda.add("libnetcdf", :my_env)
Conda.add("libnetcdf", "/path/to/directory")
Conda.add("libnetcdf", "/path/to/directory"; channel="anaconda")

(NOTE: If you are installing Python packages for use with PyCall, you must use the root environment.)

BinDeps integration: using Conda.jl as a package author

Conda.jl can be used as a Provider for BinDeps with the CondaBinDeps package.

Using a pre-existing Conda installation

To use a pre-existing Conda installation, first create an environment for Conda.jl and then set the CONDA_JL_HOME environment variable to the full path of the environment. You have to rebuild Conda.jl and many of the packages that use it after this. So as to install their dependancies to the specified enviroment.

conda create -n conda_jl python conda
export CONDA_JL_HOME="/path/to/miniconda/envs/conda_jl"
julia -e 'Pkg.build("Conda")'

Using Python 2

By default, the Conda.jl package installs Python 3, and this version of Python is used for all Python dependencies. If you want to use Python 2 instead, set CONDA_JL_VERSION to "2" prior to installing Conda. (This only needs to be done once; Conda subsequently remembers the version setting.)

Once you have installed Conda and run its Miniconda installer, the Python version cannot be changed without deleting your existing Miniconda installation. If you set ENV["CONDA_JL_VERSION"]="2" and run Pkg.build("Conda"), it will tell you how to delete your existing Miniconda installation if needed.

Most users will not need to use Python 2. This is provided primarily for developers wishing to test their packages for both Python 2 and Python, e.g. by setting the CONDA_JL_VERSION variable on TravisCI and/or AppVeyor.

Bugs and suggestions

Conda has been tested on Linux, OS X, and Windows.

Please report any bug or suggestion as an github issue

License

The Conda.jl package is licensed under the MIT Expat license, and is copyrighted by Guillaume Fraux and contributors.

conda.jl's People

Contributors

dhoegh avatar femtocleaner[bot] avatar isuruf avatar luthaf avatar m-wells avatar meggart avatar omus avatar oxinabox avatar pallharaldsson avatar quinnj avatar rofinn avatar staticfloat avatar stevengj avatar tkelman avatar tkf avatar waldyrious avatar wookay avatar yuyichao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.