Table of Contents

Binary Installation Instructions

Note that the instructions on this page should only be followed if you specifically need to install this version of EMAN2. Current releases use a completely different scheme.

Mac OS X

Note: the neural network code in EMAN2 works best on GPUs, which are available only on the Linux installations. It can still run on Mac, but will be quite slow.

1. If you have previously installed EMAN2:

2. Download eman2.X.MacOS.sh. 3. Run:

bash <path to EMAN2 installer>

4. Run these programs to see if the install worked:

e2version.py
e2speedtest.py
e2display.py
e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24

5. If you have problems with any of these programs, the first thing to check is whether you have PYTHONPATH, LD_LIBRARY_PATH or DYLD_LIBRARY_PATH set in your shell. While used in previous versions of EMAN, these variables are no longer necessary. If they are set to make some other software package work, but they interfere with the programs above, you will have to unset them, and set them only when you need the other software.

Linux Workstations (not clusters)

6. If you have previously installed EMAN2:

7. There are two linux binaries available: eman2.X.centos6.sh and eman2.X.centos7.sh

8. Run:

bash <path to EMAN2 installer>

9. The new neural network based routines are much faster running on a GPU. If you have an NVidia graphics card, see Using the GPU section below. 10. Run these programs to see if the install worked:

e2version.py
e2speedtest.py
e2display.py
e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24
e2display.py test.hdf

11. If you have problems with any of these programs, the first thing to check is whether you have PYTHONPATH or LD_LIBRARY_PATH set in your shell. While used in previous versions of EMAN, these variables are no longer used, and in some cases may interfere with Anaconda. If they have been set to make some other software package work, but they interfere with the programs above, you will have to unset them, and set them only when you need the other software. 12. Specifically, if only the last command fails and you are using a Nvidia graphic card, it is likely caused by a graphic card driver incompatibility. Updating the Nvidia driver usually fix the problem. On recent Ubuntu systems, running apt-get install nvidia-current works. On other systems, you may need to follow the installation guide from Nvidia.

Release Specific Notes

Linux Clusters

Use system OpenMPI and NumPy v1.8

Most Linux clusters will have at least one OpenMPI installation on the cluster. In some cases there may be more than one, and you may have to select a “module” to get the correct one. It is also critical that OpenMPI be compiled with the –disable-dlopen option. If you don't understand this statement, please consult with your cluster sysadmin.

13. Remove the OpenMPI we provided:

bash <path to EMAN2 directory>/utils/uninstall_openmpi.sh

14. Make sure that the correct OpenMPI for your cluster is in your path. You should be able to run 'mpicc' and get a message like 'gcc: no input files'. 15. Rebuild Pydusa using the system installed OpenMPI.

bash <path to EMAN2 directory>/utils/build_pydusa_numpy.sh 1.8 --no-test
Can't build /home/stevel/EMAN2/recipes/fftw-mpi due to environment creation error:
Downloaded bytes did not match Content-Length
  url: http://www.fftw.org/fftw-3.3.6-pl1.tar.gz
  target_path: /home/stevel/EMAN2/conda-bld/src_cache/fftw-3.3.6.tar.gz
  Content-Length: 4179807
  downloaded bytes: 208916
this means the fftw download failed. You will need to re-run this step, but first, delete the failed download : <code> rm EMAN2/conda-bld/src_cache/fftw-3.3.6.tar.gz </code>

16. Finally, install the compiled Pydusa:

bash <path to EMAN2 directory>/utils/install_pydusa_numpy.sh 1.8

Rebuild your own OpenMPI, use NumPy v1.8

This option insures that –disable-dlopen is used when compiling OpenMPI, but may lack some system-specific optimizations provided by your sysadmin.

17. Remove the OpenMPI we provided:

bash <path to EMAN2 directory>/utils/uninstall_openmpi.sh

18. Rebuild OpenMPI.

bash <path to EMAN2 directory>/utils/build_and_install_openmpi.sh

19. Rebuild Pydusa using the rebuilt OpenMPI:

bash <path to EMAN2 directory>/utils/build_pydusa_numpy.sh 1.8 --no-test
Can't build /home/stevel/EMAN2/recipes/fftw-mpi due to environment creation error:
Downloaded bytes did not match Content-Length
  url: http://www.fftw.org/fftw-3.3.6-pl1.tar.gz
  target_path: /home/stevel/EMAN2/conda-bld/src_cache/fftw-3.3.6.tar.gz
  Content-Length: 4179807
  downloaded bytes: 208916
this means the fftw download failed. You will need to re-run this step, but first, delete the failed download : <code> rm EMAN2/conda-bld/src_cache/fftw-3.3.6.tar.gz </code>

20. Finally, install the compiled Pydusa:

bash <path to EMAN2 directory>/utils/install_pydusa_numpy.sh 1.8

Windows

We are finally able to provide 64 bit Windows binaries for EMAN2. Notes:

Native Win7/10 64 bit

21. Download eman2.X.win64.exe. 22. Launch the installer, and answer any security questions you are prompted for. 23. Start a command prompt by clicking Start menu and typing cmd.exe in the dialog at the bottom. 24. On the command prompt, type

setx path "%path%;c:\<path to EMAN2 directory>\Library\bin"

25. Close the command prompt and open a new one. 26. In most cases you will want to install: Python Launcher. 27. Run these programs to see if the install worked:

e2version.py
e2speedtest.py
e2display.py
e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24

Windows 10 - Linux/Bash shell

Windows 10 includes an embeded Ubuntu Linux environment. It is possible to run the EMAN2 Linux binaries within this environment, but you will need to install some additional dependencies to do so.

28. Install “Bash on Windows 10”, https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/. 29. When prompted to set a user name, enter `root`. This should give you an account without a password.

Install OpenGL and X Server, set environment variables

30. Install OpenGL.

sudo apt-get update
sudo apt-get install libsm-dev libxrender-dev build-essential libgl1-mesa-dev mesa-utils mesa-common-dev
sudo apt-get autoremove

31. Install Xming X Server for Windows.

32. Set environment variables.

export DISPLAY=:0
glxinfo | grep OpenGL
export KMP_AFFINITY=disabled # per https://github.com/Microsoft/BashOnWindows/issues/785#issuecomment-238079769

33. Download and install `eman2.2.linux64.centos7.sh`. 34. Start X Server before running eman2 programs. 35. Run these programs to see if the install worked:

e2version.py
e2speedtest.py
e2display.py
e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24

Using the GPU

Currently, the GPU is only used for neural network operations in tomogram annotation and in particle picking. It provides a ~10 fold or more speed up in neural network training. The old CUDA implementation (which may still work) is no longer maintained and is not compiled into the release binaries. The new GPU developments are currently based on Theano and detailed documentation can be found on their website: http://deeplearning.net/software/theano/tutorial/using_gpu.html

Note that due to the NumPy version in the 2.2 release, we are still using the 'old' GPU backend for compatibility (i.e. NOT the libgpuarray backend), so be sure to use device=gpu in your .theanorc. Hopefully this will change in the 2.21 update.

On a freshly installed Ubuntu 16.10, an easy way to install the GPU support is to run the following command after successful binary installation.

apt-get install nvidia-cuda-toolkit

If you are using a new GPU (like GTX1080 or better), you may need the newest version of CUDA to support the hardware. The following command should work.

apt-get install cuda-8-0

If this does not work, you may consider downloading the latest CUDA from Nvidia through the following link and follow their instruction to install. https://developer.nvidia.com/cuda-downloads

. After the CUDA installation (run “nvcc –version” to check if it works), create a text file called .theanorc in your $HOME directory with the following content:

[global]
device = gpu
floatX = float32

Then try running any neural network related program or simply run e2.py then import theano. If you see print out message like Using gpu device * (CNMeM is disabled, cuDNN )**, it means the GPU is now being used. For other system (or if the guide above does not work), you may follow the instruction from Theano and Nvidia. Keep in mind that CUDA installation can be a painful process on some computers especially when some of the hardware are old. CUDA also has internal incompatibility issue with newer version of gcc, so it might also break other software you have installed. So be careful and good luck…