This is an old revision of the document!
Check the UV-CDAT conda-based versions installed by JYP page to see what is maintained by JYP
Versions 2.4.1 and later of UV-CDAT are installed and maintained with the conda package, dependency and environment manager. This page is about conda/Miniconda/Anaconda installation and related notes
2
extension will use Python2.7. Those with 3
will use Python3.x2
version of conda (but it would also work with 3
)conda
from Miniconda to avoid uselessly duplicating packages downloaded from the official Anaconda repository (used by Anaconda) with the same packages downloaded from the conda-forge repository (used by UV-CDAT).Note: we have shown in UV-CDAT 2.8.0 installation notes that using Miniconda for installing UV-CDAT requires indeed less space than using Anaconda
Miniconda is basically just a self contained minimal Python distribution, with only the packages required to run conda
cd /home/scratch01/jypeter
(some temporary storage space for the installer)wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
(28 Mo, 16 Feb 2017)bash Miniconda2-latest-Linux-x86_64.sh
/home/share/unix_files/cdat/miniconda2
miniconda2
directory size is 118M> du -sh miniconda2/ 118M miniconda2/ > cd miniconda2/ > du -sh * 4.4M bin 268K conda-meta 4.0K envs 20K etc 3.8M include 99M lib 4.0K LICENSE.txt 23M pkgs 16K share 8.0K ssl
.bashrc
(note: the installer automatically creates a backup of .bashrc
)# added by Miniconda2 4.3.11 installer
export PATH=“/home/share/unix_files/cdat/miniconda2/bin:$PATH”
bash
and check if the python from the conda distribution has been correctly installedconda updpate –all
conda clean –all
bash-4.1$ which python /home/share/unix_files/cdat/miniconda2/bin/python bash-4.1$ du -sh /home/share/unix_files/cdat/miniconda2 114M /home/share/unix_files/cdat/miniconda2 bash-4.1$ conda list # packages in environment at /home/share/unix_files/cdat/miniconda2: # cffi 1.9.1 py27_0 conda 4.3.13 py27_0 conda-env 2.6.0 0 cryptography 1.7.1 py27_0 [...]
/home/share/unix_files/cdat/miniconda2
~/.bash_profile
~/.condarc ~/.conda ~/.continuum
Anaconda2-4.3.0-Linux-x86_64.sh
is 462M (17 Feb 2017)jypeter@asterix3 - ...anaconda2 - 93 >du -sh /home/share/unix_files/cdat/anaconda2 2.0G /home/share/unix_files/cdat/anaconda2 jypeter@asterix3 - ...anaconda2 - 94 >du -sh /home/share/unix_files/cdat/anaconda2/* 53M /home/share/unix_files/cdat/anaconda2/bin 3.3M /home/share/unix_files/cdat/anaconda2/conda-meta 564K /home/share/unix_files/cdat/anaconda2/doc 4.0K /home/share/unix_files/cdat/anaconda2/envs 80K /home/share/unix_files/cdat/anaconda2/etc 53M /home/share/unix_files/cdat/anaconda2/include 1.7G /home/share/unix_files/cdat/anaconda2/lib 244K /home/share/unix_files/cdat/anaconda2/libexec 8.0K /home/share/unix_files/cdat/anaconda2/LICENSE.txt 3.1M /home/share/unix_files/cdat/anaconda2/mkspecs 320K /home/share/unix_files/cdat/anaconda2/phrasebooks 186M /home/share/unix_files/cdat/anaconda2/pkgs 340K /home/share/unix_files/cdat/anaconda2/plugins 156K /home/share/unix_files/cdat/anaconda2/qml 4.0K /home/share/unix_files/cdat/anaconda2/sbin 1.3M /home/share/unix_files/cdat/anaconda2/share 8.0K /home/share/unix_files/cdat/anaconda2/ssl 12K /home/share/unix_files/cdat/anaconda2/translations 24K /home/share/unix_files/cdat/anaconda2/var
conda update conda
and conda update –all
: 2.1GThe steps are the same as for Removing Miniconda
conda will use hard links and share packages common to several installed environments to minimize disk usage, but there is no harm in being careful and checking things!
~/.conda
)conda info
~/.conda
: the hidden conda directory in your home directory/somewhere/anaconda2
or /somewhere/miniconda2
: the main installation directories/somewhere/anaconda2/envs
: the directory where all the different environments will be installed/somewhere/anaconda2/pkgs
: the directory where all the packages used are installed>du -sh /home/share/unix_files/cdat/anaconda2 4.6G /home/share/unix_files/cdat/anaconda2 >du -sh /home/share/unix_files/cdat/anaconda2/envs/* 2.0G /home/share/unix_files/cdat/anaconda2/envs/uvcdat-2.8.0 >du -sh /home/share/unix_files/cdat/anaconda2/pkgs 3.8G /home/share/unix_files/cdat/anaconda2/pkgs >du -sh /home/share/unix_files/cdat/anaconda2/lib 1.7G /home/share/unix_files/cdat/anaconda2/lib
conda clean –all
in the Useful conda commands section There is also a summary available in the Conda cheat sheet
conda --help
, conda -h
conda command --help
conda info –envs
conda env list
conda create --name new_environment package1 package2 packageN
conda create -n new_environment package1 package2 packageN
conda remove --name crap_environment --all
conda clean –all
source activate existing_environment
source activate
will activate the root environmentwhich python
to determine where is the current Python you are using, or which -a python
to display all the Python executables in the currrent search pathsource deactivate
conda list
pip install package1 package2 packageN
!!conda search --full-name package_exact_name
conda search package_partial_name
--channel
option below-n target_environment
to act on another environment than the active oneconda install package1 package2 packageN
--channel channel_url_or_alias
to install from a specific channelchannel_alias
that defaults to https://conda.anaconda.org/--channel conda-forge
conda remove package1 package2 packageN
conda update conda
pkgs
directory! Use the following to Remove index cache, lock files, tarballs, unused cache packages, and source cacheconda clean --all