Strongly suggest installing current snapshot instead!
Yes, the version number is a bit odd, but this IS a release version
There are three ways to install EMAN2:
1. Traditional Binary Installation (This approach is deprecated now)
2. Install into an existing Anaconda/MiniForge installation (preferred)
3. Install from GitHub (source build)
If you are already an active Anaconda user, you may prefer approach 2 or 3, above, since it will install within your existing Anaconda system (in its own environment). Having 2 separate Anaconda installs in the same account can be a problem. We like to encourage people to use approach 3 when possible, because A) It can also use an existing Anaconda install, B)it will optimize the binary for the specific CPU you have and C) updating to our current development version becomes a very simple/quick process (if you run into a problem it becomes trivial to check if we have already fixed it). It does require that you have a C compiler installed on your machine, but otherwise requires little other knowledge. If you have built other scientific software from source in the past, we strongly encourage you to try method 3. Method 1 is the same method we have used to distribute EMAN2 binaries for the last several years. It includes a copy of Miniconda (a small version of Anaconda), with EMAN2 installed into an environment. Again, method 1 is NOT recommended if you already have Anaconda on your machine.
1. Cleanup: Only if you have an old pre-Anaconda install of EMAN2 on your machine:
2. Download: Download EMAN2.99.47
3. Install:
bash <path-to-EMAN2-installer>
4. Close Shell After installation, close your current terminal window/tab, and open a new one. The new terminal should have access to the 'conda' command. Depending on your Anaconda settings, you may need to run conda activate before using EMAN2 commands and conda deactivate to return to your normal shell settings.
5. Test: Run these programs to see if the install worked:
# This will display the exact version you have installed. If you ask for help, provide the full output of this command. e2version.py # Relative speed factor of a single core on your computer, 2-3 typ. e2speedtest.py # Opens a browser window you can use to view any EMAN2 compatible file in various ways e2display.py # Creates a small image with a circle in the middle of it e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24 # Displays the file you just created e2display.py test.hdf
Traceback (most recent call last): File "/.../.../eman2/bin/e2proc3d.py", line 35, in <module> from past.utils import old_div ModuleNotFoundError: No module named 'past'
In this case try running the dependency installation manually.
conda install eman-deps=33.1 -c cryoem -c conda-forge -c defaults
conda deactivate
and EMAN2 commands will no longer work (but any software that doesn't like Anaconda will work).
conda config --set auto_activate_base False
, which will prevent Anaconda from being activated automatically when you open new shells. In that case you will need to do a
conda activate
before running EMAN2/SPARX/SPHIRE commands.
IMPORTANT: M1/M2 Macs - The Mac binaries we currently provide here are Intel binaries using Intel Anaconda. While these will run on M1/2 Macs, they will run much more slowly than they should. Both methods 2 & 3 above will provide Native ARM64 binaries (strongly recommended).
1. Cleanup: Only if you have a pre-Anaconda install of EMAN2 on your machine:
2. Download: Download EMAN2.99.47
3. Install:
bash <path-to-EMAN2-installer>
4. Close your current terminal window (you may actually want to log out completely), then open a new terminal. The new terminal should have access to the 'conda' command. If you see (base) at the beginning of your command line, then Anaconda is active, and the following tests can be run. If you want to stop using EMAN2, you can run conda deactivate.
5. Test: Run these programs to see if the install worked:
# This will display the exact version you have installed. If you ask for help, provide the full output of this command. e2version.py # Relative speed factor of a single core on your computer, 2-3 typ. e2speedtest.py # Opens a browser window you can use to view any EMAN2 compatible file in various ways e2display.py # Creates a small image with a circle in the middle of it e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24 # Displays the file you just created e2display.py test.hdf
Traceback (most recent call last): File "/.../.../eman2/bin/e2proc3d.py", line 35, in <module> from past.utils import old_div ModuleNotFoundError: No module named 'past'
Run the dependency installation manually.
conda install eman-deps=25 -c cryoem -c defaults -c conda-forge
conda deactivate
and EMAN2 commands will no longer work (but any software that doesn't like Anaconda will work).
conda config --set auto_activate_base False
, which will prevent Anaconda from being activated automatically when you open new shells. In that case you will need to do a
conda activate
before running EMAN2/SPARX/SPHIRE commands.
Windows 10/11 includes an embedded Ubuntu Linux environment. With up to date versions of WSL, it shouldn't be necessary to install additional dependencies. You will need to have WSL configured with your favorite Linux distribution first: WSL You will also need to know something about using WSL/Linux.
Once you have WSL installed and running to your satisfaction, simply follow the Linux Installation Instructions
We are no longer providing native windows binaries for EMAN2. We strongly encourage use of the WSL approach to use EMAN2 (and other open source software) on Windows machines. The Native binaries never supported complete EMAN2/SPARX/SPHIRE functionality, and it really isn't the best approach moving forward.
If you are running an out of date WSL environment, you really should update then follow the WSL2 instructions above. However, these older instructions may be useful if you try to proceed:
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.
1. Click “Start” and type “Turn Windows Features on or off”.
2. Install Ubuntu from “Microsoft Store”.
3. Run “Ubuntu” from Start Menu.
4. 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
5. Install Xming X Server for Windows.
6. Download and install LINUX binary, not windows binary! Download EMAN2.99.47, Linux.
#!wiki note Make sure to follow the instructions for shell initialization using `conda-init`.
7. Start X Server and set environment variables.
export DISPLAY=:0 glxinfo | grep OpenGL
8. 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
This support is limited to Linux, and (potentially with some extra effort) Win 11 with an LSW2 installation.
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 tensorflow # read any messages carefully, if there are errors you may need other installations
If you have problems you cannot figure out, feel free to post questions to the EMAN2 Google Group.