Size: 3001
Comment:
|
Size: 5031
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
<<Anchor(Anaconda)>> | = EMAN2 Installation = For up-to-date binary installations you must use the instructions on this page. The old binary installation images were retired in late 2023. They are still available for historical purposes, but are no longer updated. |
Line 3: | Line 4: |
=== Install into an existing Anaconda setup (all platforms) === * ''To use this approach, you must already have [[https://docs.conda.io/en/main/miniconda.html|Miniconda]] or [[https://anaconda.com|Anaconda]] installed.'' * On M1/M2 Macs, make sure you have the ARM64 Anaconda/Miniconda, not Intel. * On Windows 11 machines, you may not use a native Windows Anaconda install, but rather need a Linux Anaconda install within a [[https://learn.microsoft.com/en-us/windows/wsl/install|WSL2]] environment! |
While the binaries on this page are fine, if you [[EMAN2/Install/SourceInstall|install from source]], then you can rapidly update when we make small patches to the code. Code is being developed continuously, and binaries are built only every few months. |
Line 8: | Line 6: |
1. '''Update (optional):''' You may wish to consider updating Anaconda before installing: {{{ conda update --all }}} but consider possible impact on other Anaconda environments you may have configured. 1. '''Install mamba (optional):''' We had been recommending that everyone install 'mamba', a MUCH faster alternative to the 'conda' command. However, mamba no longer seems to be installing properly itself with the current (as of Mar 2023) release of Anaconda. So, if you are using a somewhat older Anaconda installation, you may want to consider installing mamba, then using 'mamba' instead of 'conda' when installing packages. If you try to install mamba and it gets stuck for a long time or fails, then just use 'conda' for the EMAN2 install. Conda may take a long time to solve the install. If you want to try installing mamba: |
= Install binary into Anaconda/MiniForge environment (all platforms) = 1. '''Install Anaconda or [[https://github.com/conda-forge/miniforge/releases|MiniForge]]''' (for your platform) * On that page, scroll down to the Latest Release, then download the appropriate file, for example: Miniforge3-Linux-x86_64.sh * Run the installer, for example: bash Miniforge3-Linux-x86_64.sh * ''On M1/M2 Macs:'' make sure you have the ARM64 !MiniForge, not Intel. * ''On Windows 11:'' the native Windows !MiniForge will not work, you must use the Linux !MiniForge within a [[https://learn.microsoft.com/en-us/windows/wsl/install|WSL2]] environment! * We suggest !MiniForge to avoid licensing issues with Anaconda, but if your institution subscribes to Anaconda, that's fine too. If you use Anaconda, you may need to install Mamba manually below. 1. '''Install mamba (only if necessary):''' * if you just installed MiniForge above, you will already have mamba. If you have your own Anaconda installation, you may need this step |
Line 17: | Line 20: |
1. '''Install:''' We strongly recommend installing EMAN2 within its own Anaconda/Miniconda [[https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html|environment]]: | 1. '''Update (optional):''' consider updating Anaconda/!MiniForge before installing. It's a good idea to do this periodically: {{{ mamba update --all }}} but if you have many other (non-EMAN) environments, you may consider if this will impact them. 1. '''Install EMAN2:''' We strongly recommend installing EMAN2 within its own !MiniForge [[https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html|environment]] like this: |
Line 25: | Line 35: |
1. '''Activate to Use:''' Any time you want to use EMAN2 you will need to first activate the correct environment. You can deactivate when done. {{{ conda activate eman2 }}} |
|
Line 30: | Line 45: |
Line 31: | Line 47: |
1. '''Activate to Use:''' Any time you want to use EMAN2 you will need to first activate the correct environment. You can deactivate when done. {{{ conda activate eman2 }}} |
|
Line 41: | Line 54: |
# Opens a browser window you can use to view any EMAN2 compatible file in various ways | # Opens a browser window you can use to view any EMAN2 compatible file in various ways. Close the main window when done. |
Line 48: | Line 61: |
<<Anchor(GPU)>> == GPU Aceleration & Deep Learning == Older EMAN2 programs make use of Tensorflow for Deep Learning/GPU support, but we have been gradually migrating to the new JAX library, so having both installed is strongly suggested. * Tensorflow * Should be installed automatically as part of the EMAN2 environment setup above * You can check to see what version of Tensorflow and whether it is GPU accelerated with: "conda list|grep tensorflow". On a machine with an NVIDIA GPU and properly configured drivers, you should see a tensorflow version like "2.17.0 cuda120py312h02ad488_203". This says that you are using the CUDA 12.0, Python 3.12 version of tensorflow 2.17.0. If you see "cpu" instead of "cuda" then you do not have GPU acceleration, and you will need to sort that out. * JAX * While it is possible to install JAX using conda/mamba, it can be difficult to find a version of GPU JAX and a version of GPU Tensorflow which will install properly together this way. * Instead, we strongly suggest just installing JAX using pip: * conda activate eman2 * Linux (NVIDIA): pip install jax[cuda12] * Other (cpu): pip install jax * see [[https://pypi.org/project/jax/]] for up to date JAX instructions, this may change more frequently than this page is updated If you need to test the basic tensorflow installation, there is a program in examples/ called test_tensorflow_basic.py you can run. If you have problems you cannot figure out, feel free to post questions to the EMAN2 Google Group. |
EMAN2 Installation
For up-to-date binary installations you must use the instructions on this page. The old binary installation images were retired in late 2023. They are still available for historical purposes, but are no longer updated.
While the binaries on this page are fine, if you install from source, then you can rapidly update when we make small patches to the code. Code is being developed continuously, and binaries are built only every few months.
Install binary into Anaconda/MiniForge environment (all platforms)
Install Anaconda or MiniForge (for your platform)
- On that page, scroll down to the Latest Release, then download the appropriate file, for example: Miniforge3-Linux-x86_64.sh
- Run the installer, for example: bash Miniforge3-Linux-x86_64.sh
On M1/M2 Macs: make sure you have the ARM64 MiniForge, not Intel.
On Windows 11: the native Windows MiniForge will not work, you must use the Linux MiniForge within a WSL2 environment!
We suggest MiniForge to avoid licensing issues with Anaconda, but if your institution subscribes to Anaconda, that's fine too. If you use Anaconda, you may need to install Mamba manually below.
Install mamba (only if necessary):
if you just installed MiniForge above, you will already have mamba. If you have your own Anaconda installation, you may need this step
conda install mamba -c conda-forge
Update (optional): consider updating Anaconda/!MiniForge before installing. It's a good idea to do this periodically:
mamba update --all
but if you have many other (non-EMAN) environments, you may consider if this will impact them.Install EMAN2: We strongly recommend installing EMAN2 within its own MiniForge environment like this:
conda create -n eman2 eman-dev -c cryoem -c conda-forge
Current version:
Activate to Use: Any time you want to use EMAN2 you will need to first activate the correct environment. You can deactivate when done.
conda activate eman2
M1/M2 Macs (Optional): initial support for Tensorflow on the GPU is available via PyPi, but not conda.
# with the eman2 environment activated pip install tensorflow-metal
Linux: see the GPU section below.
- Run these programs to see if the install worked:
1 # This will display the exact version you have installed. If you ask for help, provide the full output of this command. 2 e2version.py 3 # Relative speed factor of a single core on your computer, 2-3 typ. 4 e2speedtest.py 5 # Opens a browser window you can use to view any EMAN2 compatible file in various ways. Close the main window when done. 6 e2display.py 7 # Creates a small image with a circle in the middle of it 8 e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24 9 # Displays the file you just created 10 e2display.py test.hdf
GPU Aceleration & Deep Learning
Older EMAN2 programs make use of Tensorflow for Deep Learning/GPU support, but we have been gradually migrating to the new JAX library, so having both installed is strongly suggested.
- Tensorflow
- Should be installed automatically as part of the EMAN2 environment setup above
- You can check to see what version of Tensorflow and whether it is GPU accelerated with: "conda list|grep tensorflow". On a machine with an NVIDIA GPU and properly configured drivers, you should see a tensorflow version like "2.17.0 cuda120py312h02ad488_203". This says that you are using the CUDA 12.0, Python 3.12 version of tensorflow 2.17.0. If you see "cpu" instead of "cuda" then you do not have GPU acceleration, and you will need to sort that out.
- JAX
- While it is possible to install JAX using conda/mamba, it can be difficult to find a version of GPU JAX and a version of GPU Tensorflow which will install properly together this way.
- Instead, we strongly suggest just installing JAX using pip:
- conda activate eman2
- Linux (NVIDIA): pip install jax[cuda12]
- Other (cpu): pip install jax
see https://pypi.org/project/jax/ for up to date JAX instructions, this may change more frequently than this page is updated
If you need to test the basic tensorflow installation, there is a program in examples/ called test_tensorflow_basic.py you can run.
If you have problems you cannot figure out, feel free to post questions to the EMAN2 Google Group.