Why not pip
, wheels, virtualenvs?
site-packages
?apt
, brew
, yum
) and the included compiler (e.g. clang
, gcc
).Scientific Python community identified that there was a gap not being addressed by the core Python infrastructure, limiting their ability to get packages into the hands of users
Industry standard built by people who care about this space – Continuum Analytics
It solves a hard problem:
Built for Python first, but it really solves a much broader infrastructural issue.
meta.yaml
, and a build recipe.What can it install? Not just scientific packages. It can help with:
See conda-recipes for a comprehensive set of build recipes. Everything from applications to compilers to Python modules, hundreds of maintained recipes across many problem domains.
Conda packages can come from a variety of locations:
file://
)Command line interface
Will show what we’re working on to make this easier, especially for non-developers
To start:
conda --help
Activating environments, a couple ways:
cd /d C:\ArcGIS\bin\Python\Scripts
activate arcgispro-py3
Once you’re in an environment get details with info
:
conda info
Conda info is the starting point – it tells you the state of the environment.
conda info
Current conda install:
platform : win-64
conda version : 4.0.4
conda-build version : not installed
python version : 3.5.1.final.0
requests version : 2.9.1
root environment : C:\ArcGIS\bin\Python (writable)
default environment : C:\ArcGIS\bin\Python\envs\arcgispro-py3
envs directories : C:\ArcGIS\bin\Python\envs
package cache : C:\ArcGIS\bin\Python\pkgs
channel URLs : https://conda.anaconda.org/esri/win-64/
https://conda.anaconda.org/esri/noarch/
https://repo.continuum.io/pkgs/free/win-64/
https://repo.continuum.io/pkgs/free/noarch/
config file : C:\ArcGIS\bin\Python\.condarc
conda list
# packages in environment at C:\ArcGIS\bin\Python\envs\arcgispro-py3:
#
arcgispro 1.0 0 esri
matplotlib 1.4.3 np19py34_0 defaults
nose 1.3.7 py34_0 defaults
numpy 1.9.3 py34_0e [arcgispro] esri
pandas 0.17.1 np19py34_0 esri
pip 8.0.3 py34_0 defaults
pyparsing 2.0.3 py34_0 defaults
pypdf2 1.25.1 py_0 esri
python 3.4.4 2 defaults
python-dateutil 2.4.2 py34_0 defaults
pytz 2015.7 py34_0 defaults
scipy 0.16.1 np19py34_0e [arcgispro] esri
setuptools 20.1.1 py34_0 defaults
six 1.10.0 py34_0 defaults
sympy 0.7.6.1 py34_0 defaults
wheel 0.29.0 py34_0 defaults
xlrd 0.9.4 py34_0 defaults
xlwt 1.0.0 py34_0 defaults
Creating new environments:
conda create --name my_env python=3.4 numpy flask dask
Can also use a file which includes all the dependencies:
conda create --name my_env --file my_sweet_depends.txt
These can contain explcit information about channels, to ensure that the new environment precisely matches the requirements.
Name | Means | Will Ship? |
---|---|---|
Conda | The command itself | ✓ |
Miniconda | A minimum set of Python packages to build and run Conda. | ✓ |
Anaconda | A distribution 200+ packages built with Conda | |
Anaconda Server | Host the full infrastructure internally |
How’s it work?
Lock it down: Don’t use network
Can vet the installation
Will work out of the box with default packages without any network connectivity
.condarc
conda config
, just like using git config
to update the default configurationStraightforward:
meta.yaml
) specifying the contents and dependenciesbld.bat
, build.sh
) specifying how to buildmeta.yaml
:
package:
name: pypdf2
version: "1.25.1"
source:
fn: PyPDF2-1.25.1.tar.gz
url: https://pypi.python.org/packages/source/P/PyPDF2/PyPDF2-1.25.1.tar.gz
md5: ee5e5b01d00b120805e5049e56c6fd7c
requirements:
run:
- python
bld.bat
:
"%PYTHON%" setup.py install
Currently:
Platform | Python version |
---|---|
Desktop | Python 2.7.x (2.7.10) |
Pro | Python 3.4.x (3.4.3) |
Upgrade code? Python migration for ArcGIS Pro
But… this can be costly. For many organizations, a significant burden, even if the language changes are relatively small.
With Conda, we can support multiple platforms:
Create a new environment, target a different Python, users can now use that with the Py2 code
Still need to change arcpy.mapping
to arcpy.mp
when moving from Desktop to Pro, but no Python language level changes needed.
Have to make sure you’re running the right Python (what happens when you type python
at the command line?)
Requires some user education over the “only one Python on the box” model
requests
)conda
today. Miniconda is fully stand-alone, won’t affect your global Python (unless you tell it to)Effectively manage complex software dependencies with Conda. Thousands of packages exist today, can integrate it into your organization’s needs.
Esri Conda Team:
Continuum Analytics for creating and open sourcing Conda
iOS, Android: Feedback from within the app
Windows Phone, don’t use a smartphone?: Cuniform tablets accepted (sorry! limitation).
Windows Phone, or no smartphone? Cuneiform tablets accepted.