Setup Python 3 Environment

Existing Miniconda/Anaconda Installations

  1. Create a new environment with python 3

    conda create -n eman-deps-15 eman-deps=15 -c cryoem/label/py3 -c cryoem -c defaults -c conda-forge
  2. Use the activation command printed at the end of the previous command's run to activate the new conda environment

    conda activate eman-deps-15
    or
    source activate eman-deps-15
  3. To switch to another conda environment, first deactivate your current environment

    conda deactivate
    or
    source deactivate

New Miniconda Installations

  1. Download and install Miniconda.

  2. Add the new installation to PATH.

    export PATH=<new miniconda path>/bin:$PATH
  3. Update conda

    conda update conda -c defaults
  4. Install eman-deps with python 3

    conda install eman-deps=15 -c cryoem/label/py3 -c cryoem -c defaults -c conda-forge

Build

  1. Update eman2 source

    cd <source directory>
    git checkout py3-dev
    git pull --rebase
  2. Activate the python 3 environment, if it is a conda environment

    conda activate eman-deps-15
    or
    source activate eman-deps-15
    or edit PATH to have the miniconda installation with python 3 as the first entry.
  3. Move into your build directory

    cd <python 3 build directory>
  4. Build and install

    cmake <eman2 source directory>
    make
    make install