Table of Contents

Binary Installation Instructions v2.91

We do not recommend installing EMAN2.91. It is significantly out of date. Please follow the easier instructions for the newer version: from source or Binary

Download

Official releases are in reverse chronological order. The Continuous Build is rebuilt daily and any time a developer makes a change they think users should have access to. It is normally reasonably stable, and will contain the latest pre-publication features. Alternatively, the highest numbered version will contain a stable and tested release.

Install

MacOS and Linux

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. Cleanup: If you have previously installed EMAN2:

2. Download: Download EMAN2.91 3. Install:

bash <path-to-EMAN2-installer>
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
...
...
...
unset __conda_setup
# <<< conda initialize <<<
If you have any other similar looking blocks before the last one, remove them to avoid any potential conflicts.
  * If you use a different shell, such as tcsh or zsh, you may need to edit the appropriate file yourself.
  * You should not normally need to reinstall OpenMPI. The copy of OpenMPI/Pydusa now distributed with the binaries should work on Macs/Linux workstations in most cases.
  * Don't forget to restart your shell if you changed the .profile/.bashrc or other scripts.
  * **Mac users:** If you don't understand what the .profile instructions are talking about, this may help: https://stackoverflow.com/questions/7501678/set-environment-variables-on-mac-os-x-lion

4. Test: 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

Notes

5. Linux users: 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. 6. Mac users (Big Sur): Big Sur (MacOS 11) includes new security features which require you to give software permission to access specific folders. This can cause problems for many open-source software packages launched from the command line. The easiest solution is Preferences → Security & Privacy → Privacy → Full Disk Access, and give Terminal full access. This will not solve every problem, and you need to be aware of potential security risks in doing this, but for most scientific users it is a good solution. 7. Mac users (Apple Silicon, M1): Anaconda does not yet fully support native M1 software, so you will need to install the normal Mac build. The installer will say that you appear not to be running on a 64 bit machine, and ask if you wish to install anyway. Say YES. Performance is excellent even though it isn't a native build. 8. Check continuous build sections, Notes and Troubleshooting, which may contain more up-to-date info that may be relevant here.

Troubleshooting and Tips

Run the dependency installation manually.

conda install eman-deps=25 -c cryoem -c defaults -c conda-forge

Windows

While we do provide 64 bit Windows binaries for EMAN2, some functionality may be broken, so we strongly recommend using the Windows-WSL option below if at all possible.

Notes for native Windows version:

Native Win7/10 64 bit

9. Download Download EMAN2.91. 10. Launch the installer.

11. **Select Installation Type:** Just Me
12. **Choose Installation Location:** Select a location with NO space in path
13. **Advanced Installation Options:** Don't add EMAN2 to PATH environment variable.

14. Open Anaconda Prompt by clicking Windows Start Menu → Anaconda3 (64-bit) → Anaconda Prompt or Start Menu → Anaconda3 (64-bit) → Anaconda Prompt(installation-folder-name). 15. In most cases you will want to install: Python Launcher (launchwin-1.0.1.6.msi). 16. 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

«Anchor(Windows-WSL)»

Windows 10 - Linux/Bash shell (As of 12/15/2020)

Windows 10 includes an embedded Ubuntu Linux environment. It is possible to run the EMAN2 Linux binaries within this Win10 environment, but you will need to install some additional dependencies to do so. Also, you will effectively be running at a Linux command prompt, so you will have to become a bit familiar with Linux to do this, but it does avoid installing an additional operating system on your machine.

#!wiki note
https://docs.microsoft.com/en-us/windows/wsl/install-win10.

17. Click “Start” and type “Turn Windows Features on or off”.

|width=600

18. Install Ubuntu from “Microsoft Store”.

|width=600

19. Run “Ubuntu” from Start Menu.

20. Install OpenGL.

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

21. Install Xming X Server for Windows.

22. Download and install LINUX binary, not windows binary! Download EMAN2.91, Linux. Make sure to follow the instructions for shell initialization using `conda-init`.

23. Start X Server and set environment variables.

export DISPLAY=:0
glxinfo | grep OpenGL

|width=700

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

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

|width=700

«Anchor(GPU)»

Using the GPU (Linux only)

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 new GPU developments are currently based on TensorFlow. From about 2006-2012 EMAN2 had its own internal CUDA code, which could be compiled into the C++ library. This has been deprecated, and likely no longer works, though the code is still present. We are working on a new GPU support strategy moving forward.

Many machines will have CUDA installed already, and if CUDA is an appropriate version, this should work fine with the !TensorFlow version shipped with EMAN2. However, if you are running newer versions of CUDA there may be problems. You can test compatibility quickly with:

# Make sure you have your environment set to run EMAN2 programs
e2version.py
# The above command should work and return your current version. If it does, then run:
python -c "import tensorflow"

If this command does not return an error, then you should be able to run deep learning software within EMAN2. If it does raise an error, then you will need to debug the problem:

apt-get install nvidia-cuda-toolkit
conda remove tensorflow-gpu tensorflow-gpu-base
pip install cython
pip install tensorflow
# read any messages carefully, if there are errors you may need other installations
[dnn]
enabled=False

. If you get a very long string of errors a few seconds after trying to train a network, and see references to “narrowing” in the errors, this probably means your C++ compiler is newer than Theano expects. You can try adding the following to your .theanorc file:

[gcc]
cxxflags = -Wno-narrowing