4707
Comment: conda install cmake
|
6862
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= NOTE = Due to recent version upgrades of some packages, build instructions may be broken. Assessing the situation and applying fixes if necessary... |
|
Line 2: | Line 5: |
Line 5: | Line 7: |
== GPU Support == For features which support the GPU, please complete the source install instructions below, then follow the [[EMAN2/Install/BinaryInstallAnaconda#GPU|GPU instructions]] from the binary installation page. |
|
Line 6: | Line 11: |
Line 9: | Line 13: |
=== Linux Clusters === The approaches below will install EMAN2 with a precompiled version of OpenMPI, which may or may not work with the batch queuing system on your cluster. If it does not work, the symptom will be that MPI parallel jobs will use only a single node, no matter how many you have allocated in your job. If this happens please see the linux cluster installations on the [[EMAN2/Install/BinaryInstallAnaconda|binary install page]]. Those instructions should also work with either of the source-based installations below. https://github.com/cryoem/eman2/pull/167 |
|
Line 10: | Line 17: |
1. Download and install [[https://conda.io/miniconda.html | Miniconda2]] - make sure you don't get the Python3 version | 1. Download and install [[https://conda.io/miniconda.html|Miniconda2]] - make sure you get the '''Python2''' version, not --(Python3)-- version. a. '''Linux''': Latest version known to work with Linux is [[https://repo.continuum.io/miniconda/Miniconda2-4.3.21-Linux-x86_64.sh|here]]. |
Line 12: | Line 20: |
1. Checkout EMAN2 code from [[https://github.com/cryoem/eman2 | GitHub:cryoem/eman2]]. | 1. Checkout EMAN2 code from [[https://github.com/cryoem/eman2|GitHub:cryoem/eman2]]. |
Line 14: | Line 22: |
cd <path-to-eman2-source> | cd <path-where-you-want-eman2-source> # eg - $HOME/src |
Line 16: | Line 24: |
}}} | # this will create an eman2 folder containing the current source code from the master branch }}} |
Line 19: | Line 28: |
conda install cmake=3.8 -c conda-forge | |
Line 20: | Line 30: |
conda install eman-deps="*"="np18*" -c cryoem -c defaults -c conda-forge # Linux | conda install eman-deps="*"="np19*" -c cryoem -c defaults -c conda-forge # Linux }}} a. If you have a broken cmake or ccmake, try the following sequence of commands. {{{ conda remove cmake bzip2 expat jsoncpp ncurses |
Line 22: | Line 36: |
}}} 1. Create a build directory (out-of-source builds are recommended). |
conda install eman-deps -c cryoem -c defaults -c conda-forge # Mac OSX conda install eman-deps="*"="np19*" -c cryoem -c defaults -c conda-forge # Linux }}} 1. Create a build directory (out-of-source builds are recommended). |
Line 25: | Line 41: |
mkdir <build-directory> # eg- $HOME/src/eman2-build | |
Line 26: | Line 43: |
cmake -DENABLE_CONDA=ON <path-to-eman2-source> # on linux, also add -DENABLE_OPTIMIZE_MACHINE=ON }}} * If conda is not found in PATH, set CONDA_ROOT to your conda environment directory. It could be the main installation or an environment. This step most likely will be needed only if you use '''cmake-gui'''. * If you set CONDA_ROOT to an environment, make sure to delete any cmake variables that cmake already found, variables like EMAN_INSTALL_PREFIX, EMAN_PREFIX, *_LIBRARY or similar, *_INCLUDE_PATH or similar. |
cmake <path-to-eman2-source> # - eg $HOME/src/eman2. On linux, also add -DENABLE_OPTIMIZE_MACHINE=ON }}} * If conda is not found in PATH, set CONDA_PREFIX to your conda environment directory. It could be the main installation or an environment. This step most likely will be needed only if you use '''cmake-gui'''. * If you set CONDA_PREFIX to an environment, make sure to delete any cmake variables that cmake already found, variables like *_LIBRARY or similar, *_INCLUDE_PATH or similar. |
Line 32: | Line 48: |
1. Build EMAN2 {{{ | 1. Build EMAN2 {{{ |
Line 35: | Line 52: |
}}} 1. You may also wish to run |
}}} 1. You may also wish to run |
Line 43: | Line 60: |
1. Download and install [[https://www.continuum.io/downloads | Anaconda2]] - make sure you don't get the Python3 version | 1. Download and install [[https://www.continuum.io/downloads|Anaconda2]] - make sure you get the '''Python2''' version, not --(Python3)-- version. |
Line 45: | Line 62: |
1. Checkout EMAN2 code from [[https://github.com/cryoem/eman2 | GitHub:cryoem/eman2]]. | 1. Checkout EMAN2 code from [[https://github.com/cryoem/eman2|GitHub:cryoem/eman2]]. |
Line 47: | Line 64: |
cd <path-to-eman2-source> | cd <path-where-you-want-eman2-source> # eg - $HOME/src |
Line 49: | Line 66: |
}}} | # this will create an eman2 folder containing the current source code from the master branch }}} |
Line 52: | Line 70: |
conda create -n eman-env eman-deps -c cryoem -c defaults -c conda-forge # Mac conda create -n eman-env eman-deps="*"="np18*" -c cryoem -c defaults -c conda-forge # Linux |
conda create -n eman-env cmake=3.8 -c conda-forge conda install -n eman-env eman-deps -c cryoem -c defaults -c conda-forge # Mac conda install -n eman-env eman-deps="*"="np19*" -c cryoem -c defaults -c conda-forge # Linux |
Line 55: | Line 74: |
}}} a. If you have a broken cmake or ccmake, try the following sequence of commands. {{{ conda remove cmake bzip2 expat jsoncpp ncurses |
|
Line 56: | Line 79: |
}}} | conda install eman-deps -c cryoem -c defaults -c conda-forge # Mac OSX conda install eman-deps="*"="np19*" -c cryoem -c defaults -c conda-forge # Linux }}} |
Line 58: | Line 83: |
1. Create a build directory (out-of-source builds are recommended). | 1. Create a build directory (out-of-source builds are recommended). |
Line 60: | Line 85: |
mkdir <build-directory> # eg- $HOME/src/eman2-build | |
Line 61: | Line 87: |
cmake -DENABLE_CONDA=ON <path-to-eman2-source> # on linux, also add -DENABLE_OPTIMIZE_MACHINE=ON }}} * If conda is not found in PATH, set CONDA_ROOT to your conda environment directory. It could be the main installation or an environment. This step most likely will be needed only if you use '''cmake-gui'''. * If you set CONDA_ROOT to an environment, make sure to delete any cmake variables that cmake already found, variables like EMAN_INSTALL_PREFIX, EMAN_PREFIX, *_LIBRARY or similar, *_INCLUDE_PATH or similar. |
cmake <path-to-eman2-source> # - eg $HOME/src/eman2. On linux, also add -DENABLE_OPTIMIZE_MACHINE=ON }}} * If conda is not found in PATH, set CONDA_PREFIX to your conda environment directory. It could be the main installation or an environment. This step most likely will be needed only if you use '''cmake-gui'''. * If you set CONDA_PREFIX to an environment, make sure to delete any cmake variables that cmake already found, variables like *_LIBRARY or similar, *_INCLUDE_PATH or similar. |
Line 67: | Line 92: |
1. Build EMAN2 {{{ | 1. Build EMAN2 {{{ |
Line 70: | Line 96: |
}}} 1. You may also wish to run |
}}} 1. You may also wish to run |
Line 75: | Line 101: |
}}} | }}} |
NOTE
Due to recent version upgrades of some packages, build instructions may be broken. Assessing the situation and applying fixes if necessary...
Anaconda based Build, All Platforms
Note that even with a source build it may be difficult to get this working on systems with very old operating system installs. We normally try to support OS versions 6-7 years old. Please report any problems.
GPU Support
For features which support the GPU, please complete the source install instructions below, then follow the GPU instructions from the binary installation page.
Mac OS X, Linux
There are two approaches you can use for the installation. One uses 'Miniconda' and the other uses full 'Anaconda'. Miniconda is a much smaller (~30 MB) install, provides everything EMAN2 needs, and can be expanded with more packages as you like. Anaconda is a much more complete environment (~300 MB), including useful tools such as the Jupyter notebook, but will require the use of a conda environment to make EMAN2 work properly at present.
Linux Clusters
The approaches below will install EMAN2 with a precompiled version of OpenMPI, which may or may not work with the batch queuing system on your cluster. If it does not work, the symptom will be that MPI parallel jobs will use only a single node, no matter how many you have allocated in your job. If this happens please see the linux cluster installations on the binary install page. Those instructions should also work with either of the source-based installations below. https://github.com/cryoem/eman2/pull/167
Miniconda2
Download and install Miniconda2 - make sure you get the Python2 version, not Python3 version.
Linux: Latest version known to work with Linux is here.
- Make sure that you have added miniconda2/bin as the first element in your PATH, and that you do not have LD_LIBRARY_PATH or PYTHONPATH set in your shell. If you need these settings for other software, you can still try to proceed, and hope they do not conflict with Miniconda. Alternatively, you may set up a shell script or alias to make these environment changes on demand when you want to use EMAN2/miniconda.
Checkout EMAN2 code from GitHub:cryoem/eman2.
cd <path-where-you-want-eman2-source> # eg - $HOME/src git clone https://github.com/cryoem/eman2.git # this will create an eman2 folder containing the current source code from the master branch
- Install dependencies
conda install cmake=3.8 -c conda-forge conda install eman-deps -c cryoem -c defaults -c conda-forge # Mac OSX conda install eman-deps="*"="np19*" -c cryoem -c defaults -c conda-forge # Linux
- If you have a broken cmake or ccmake, try the following sequence of commands.
conda remove cmake bzip2 expat jsoncpp ncurses conda install cmake=3.8 -c conda-forge conda install eman-deps -c cryoem -c defaults -c conda-forge # Mac OSX conda install eman-deps="*"="np19*" -c cryoem -c defaults -c conda-forge # Linux
- If you have a broken cmake or ccmake, try the following sequence of commands.
- Create a build directory (out-of-source builds are recommended).
mkdir <build-directory> # eg- $HOME/src/eman2-build cd <build-directory> cmake <path-to-eman2-source> # - eg $HOME/src/eman2. On linux, also add -DENABLE_OPTIMIZE_MACHINE=ON
If conda is not found in PATH, set CONDA_PREFIX to your conda environment directory. It could be the main installation or an environment. This step most likely will be needed only if you use cmake-gui.
- If you set CONDA_PREFIX to an environment, make sure to delete any cmake variables that cmake already found, variables like *_LIBRARY or similar, *_INCLUDE_PATH or similar.
- Rerun cmake.
- Build EMAN2
make -j make install
- You may also wish to run
make test # if everything passes you are fine, if there are failures, you are welcome to ask make test-verbose # verbose test output to help to identify specific failures
Anaconda2
Download and install Anaconda2 - make sure you get the Python2 version, not Python3 version.
- Make sure that you have added anaconda2/bin as the first element in your PATH, and that you do not have LD_LIBRARY_PATH or PYTHONPATH set in your shell. If you need these settings for other software, you can still try to proceed, and hope they do not conflict with Miniconda. Alternatively, you may set up a shell script or alias to make these environment changes on demand when you want to use EMAN2/miniconda.
Checkout EMAN2 code from GitHub:cryoem/eman2.
cd <path-where-you-want-eman2-source> # eg - $HOME/src git clone https://github.com/cryoem/eman2.git # this will create an eman2 folder containing the current source code from the master branch
- Install dependencies
conda create -n eman-env cmake=3.8 -c conda-forge conda install -n eman-env eman-deps -c cryoem -c defaults -c conda-forge # Mac conda install -n eman-env eman-deps="*"="np19*" -c cryoem -c defaults -c conda-forge # Linux source activate eman-env
- If you have a broken cmake or ccmake, try the following sequence of commands.
conda remove cmake bzip2 expat jsoncpp ncurses conda install cmake=3.8 -c conda-forge conda install eman-deps -c cryoem -c defaults -c conda-forge # Mac OSX conda install eman-deps="*"="np19*" -c cryoem -c defaults -c conda-forge # Linux
- If you have a broken cmake or ccmake, try the following sequence of commands.
Note that you will need to run source activate eman-env once in each shell before being able to run EMAN2 commands.
- Create a build directory (out-of-source builds are recommended).
mkdir <build-directory> # eg- $HOME/src/eman2-build cd <build-directory> cmake <path-to-eman2-source> # - eg $HOME/src/eman2. On linux, also add -DENABLE_OPTIMIZE_MACHINE=ON
If conda is not found in PATH, set CONDA_PREFIX to your conda environment directory. It could be the main installation or an environment. This step most likely will be needed only if you use cmake-gui.
- If you set CONDA_PREFIX to an environment, make sure to delete any cmake variables that cmake already found, variables like *_LIBRARY or similar, *_INCLUDE_PATH or similar.
- Rerun cmake.
- Build EMAN2
make -j make install
- You may also wish to run
make test # if everything passes you are fine, if there are failures, you are welcome to ask make test-verbose # verbose test output to help to identify specific failures