3024
Comment: add test commands
|
6759
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
'''Note:''' Along with upgrading '''!NumPy''' to 1.13, we are also upgrading '''conda''' to 4.4 and '''conda-build''' to 3. Please, pay attention to PATH related instructions as there is no need to manipulate PATH anymore. | |
Line 5: | Line 6: |
== 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 10: |
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. | |
Line 7: | Line 12: |
1. Download and install [[https://conda.io/miniconda.html | Miniconda2]] or [[https://www.continuum.io/downloads | Anaconda2]]. a. '''Miniconda2 (<30MB)''': Minimal installer that contains conda and Python. Ideal for cluster installations and if you need conda only for EMAN2. a. '''Anaconda2 (270-350 MB)''': Entire Anaconda distribution, open data science platform powered by Python. Includes packages like Jupyter, Spyder, Anaconda Navigator. |
=== 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 11: | Line 15: |
1. Checkout EMAN2 code from [[https://github.com/cryoem/eman2 | GitHub:cryoem/eman2]]. {{{ cd <some-path-to-keep-eman2-source> git clone https://github.com/cryoem/eman2.git |
=== Miniconda2 === 1. Download and install '''Miniconda2-4.4.10''' for [[https://repo.continuum.io/miniconda/Miniconda2-4.4.10-Linux-x86_64.sh|Linux]] or [[https://repo.continuum.io/miniconda/Miniconda2-4.4.10-MacOSX-x86_64.sh|Mac OSX]]. 1. For existing installations install conda 4.4. {{{ conda install conda=4.4 -c defaults |
Line 17: | Line 22: |
1. Install dependencies. Follow only one of the steps below: a. This option installs EMAN2 dependencies into a conda environment. It requires running the second command in each shell before trying to run EMAN2/SPARX/SPHIRE commands. {{{ conda create -n eman-env eman-deps -c cryoem -c defaults -c conda-forge source activate eman-env |
1. '''Remove''' any miniconda2/bin entries from your PATH and run {{{ . <miniconda2-path>/etc/profile.d/conda.sh |
Line 22: | Line 26: |
a. This option is easier, and doesn't use an environment. It will work with Miniconda, but will not work with Anaconda versions 4.2.0 (2016-09-28) and newer, because the bundled Qt version was upgraded from version 4 to 5. {{{ conda install eman-deps -c cryoem -c defaults -c conda-forge # Mac OSX conda install eman-deps=*=np18* -c cryoem -c defaults -c conda-forge # Linux }}} Listing the channels explicitly can be avoided by specifying them in $HOME/.condarc, see conda documentation for more details, https://conda.io/docs/using/index.html. |
. or, if you have a line reading {{{ export PATH=<miniconda2-path>/bin:$PATH }}} in your .bashrc or .profile, replace it with {{{ . <miniconda2-path>/etc/profile.d/conda.sh }}} |
Line 27: | Line 35: |
1. Out-of-source builds are recommended, so work in a directory outside of eman2 source (this is a recommended practice in general, not EMAN2-specific). Note '''cmake''', not '''--( ccmake )--'''. CMake will automatically find the dependencies. If you want to change any of the CMake values, then use '''cmake-gui''' or '''ccmake'''. {{{ | 1. Make sure 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. |
Line 29: | Line 37: |
1. '''Install dependencies''' {{{ conda install cmake=3.9 -c defaults conda install eman-deps=8 -c cryoem -c defaults -c conda-forge }}} 1. '''Checkout EMAN2 code''' from [[https://github.com/cryoem/eman2|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 }}} 1. '''Create a build directory''' (out-of-source builds are recommended). {{{ mkdir <build-directory> # eg- $HOME/src/eman2-build |
|
Line 30: | Line 54: |
cmake <some-path-to-keep-eman2-source> | cmake <path-to-eman2-source> # - eg $HOME/src/eman2. On linux, also add -DENABLE_OPTIMIZE_MACHINE=ON |
Line 32: | Line 56: |
1. 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'''. a. 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. a. Rerun cmake. 1. Continue with '''make'''. {{{ make -j # "make" should pick up the number of available processors, make -j4 # but you may specify the number if you like make install && make test make test-verbose # this will output more test details and may be helpful to identify failures |
* 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. 1. '''Build EMAN2''' {{{ make -j make install |
Line 41: | Line 65: |
1. 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 === 1. Download and install '''Anaconda2-5.1.0''' for [[https://repo.continuum.io/archive/Anaconda2-5.1.0-Linux-x86_64.sh|Linux]] or [[https://repo.continuum.io/archive/Anaconda2-5.1.0-MacOSX-x86_64.sh|Mac OSX]]. 1. For existing installations install conda 4.4. {{{ conda install conda=4.4 -c defaults }}} 1. '''Remove''' any anaconda2/bin entries from your PATH and run {{{ . <anaconda2-path>/etc/profile.d/conda.sh }}} . or, if you have a line reading {{{ export PATH=<anaconda2-path>/bin:$PATH }}} in your .bashrc or .profile, replace it with {{{ . <anaconda2-path>/etc/profile.d/conda.sh }}} 1. Make sure 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 Anaconda. Alternatively, you may set up a shell script or alias to make these environment changes on demand when you want to use EMAN2/anaconda. 1. '''Install dependencies''' {{{ conda create -n eman-env cmake=3.9 -c defaults conda install -n eman-env eman-deps=8 -c cryoem -c defaults -c conda-forge conda activate eman-env }}} 1. Note that you will need to run {{{ conda activate eman-env }}} once in each shell before being able to run EMAN2 commands. 1. '''Checkout EMAN2 code''' from [[https://github.com/cryoem/eman2|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 }}} 1. '''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. 1. '''Build EMAN2''' {{{ make -j make install }}} 1. 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 }}} |
Anaconda based Build, All Platforms
Note: Along with upgrading NumPy to 1.13, we are also upgrading conda to 4.4 and conda-build to 3. Please, pay attention to PATH related instructions as there is no need to manipulate PATH anymore.
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-4.4.10 for Linux or Mac OSX.
- For existing installations install conda 4.4.
conda install conda=4.4 -c defaults
- For existing installations install conda 4.4.
Remove any miniconda2/bin entries from your PATH and run
. <miniconda2-path>/etc/profile.d/conda.sh
- or, if you have a line reading
export PATH=<miniconda2-path>/bin:$PATH
in your .bashrc or .profile, replace it with. <miniconda2-path>/etc/profile.d/conda.sh
- Make sure 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.
Install dependencies
conda install cmake=3.9 -c defaults conda install eman-deps=8 -c cryoem -c defaults -c conda-forge
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
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-5.1.0 for Linux or Mac OSX.
- For existing installations install conda 4.4.
conda install conda=4.4 -c defaults
- For existing installations install conda 4.4.
Remove any anaconda2/bin entries from your PATH and run
. <anaconda2-path>/etc/profile.d/conda.sh
- or, if you have a line reading
export PATH=<anaconda2-path>/bin:$PATH
in your .bashrc or .profile, replace it with. <anaconda2-path>/etc/profile.d/conda.sh
- Make sure 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 Anaconda. Alternatively, you may set up a shell script or alias to make these environment changes on demand when you want to use EMAN2/anaconda.
Install dependencies
conda create -n eman-env cmake=3.9 -c defaults conda install -n eman-env eman-deps=8 -c cryoem -c defaults -c conda-forge conda activate eman-env
Note that you will need to run conda activate eman-env once in each shell before being able to run EMAN2 commands.
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
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