User Tools

Site Tools


eman2:install:sourceinstall

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
eman2:install:sourceinstall [2025/06/14 22:33] – created steveludtkeeman2:install:sourceinstall [2025/06/30 02:38] (current) – [ARM-64 Linux] steveludtke
Line 18: Line 18:
 ===== Initial Setup ===== ===== Initial Setup =====
 This section only needs to be completed once. If you have a working EMAN2 source installation and just wish to update, skip ahead to **Build and Install**. This section only needs to be completed once. If you have a working EMAN2 source installation and just wish to update, skip ahead to **Build and Install**.
-  - **Check your account for possible problems** + 
 + 1. **Check your account for possible problems** 
     * IF you have conda-forge, mini-forge or Anaconda already installed in your account, and wish to try setting up EMAN2 as a new environment skip ahead to //Configure and update conda//. This may or may not work, depending on the age of your previous Anaconda install.     * IF you have conda-forge, mini-forge or Anaconda already installed in your account, and wish to try setting up EMAN2 as a new environment skip ahead to //Configure and update conda//. This may or may not work, depending on the age of your previous Anaconda install.
     * Otherwise:     * Otherwise:
Line 31: Line 32:
 </code> </code>
  
-  - **Download and install** + 2. **Download and install** 
     * Note: If your site has an Anaconda license, you are welcome to use the conda provided by a proper Anaconda/MiniConda installation. Using mini-forge, which provides 'conda' and 'mamba' command line tools is completely FOSS. All EMAN2 dependencies are provided by conda-forge and make no use of the Anaconda mainline repository, so require no licensing agreement (as far as we can determine).     * Note: If your site has an Anaconda license, you are welcome to use the conda provided by a proper Anaconda/MiniConda installation. Using mini-forge, which provides 'conda' and 'mamba' command line tools is completely FOSS. All EMAN2 dependencies are provided by conda-forge and make no use of the Anaconda mainline repository, so require no licensing agreement (as far as we can determine).
  
Line 44: Line 45:
  Please ignore any references to //micromamba// in the text displayed by the installer and just follow these instructions.  Please ignore any references to //micromamba// in the text displayed by the installer and just follow these instructions.
  
-## 1. **Initialize conda for shell interaction.** These instructions will depend on what shell you use. The default on most systems is //bash//. If you use a different shell ( //tsch//, //zsh//, ... ), you will need to take that into account:+ 3. **Initialize conda for shell interaction.** These instructions will depend on what shell you use. The default on most systems is //bash//. If you use a different shell ( //tsch//, //zsh//, ... ), you will need to take that into account:
  
 ## <code>#!highlight bash ## <code>#!highlight bash
Line 61: Line 62:
  For more information on conda-init and activation, see [[https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment|Environment Activation]].  For more information on conda-init and activation, see [[https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment|Environment Activation]].
  
-  - **Configure and update conda.**+ 4. **Configure and update conda.**
  <code>#!highlight bash  <code>#!highlight bash
 # We suggest the following, meaning you will need to use //conda activate// after logging in before using EMAN2 # We suggest the following, meaning you will need to use //conda activate// after logging in before using EMAN2
Line 78: Line 79:
 </code> </code>
  
-  - **Create a new environment** with EMAN2 dependencies. //eman2// below is the name of the environment. You may make this whatever you like, as long as you remember to use the same name when doing //conda activate//. Note that this name will appear as part of your prompt when activated, so you may want to keep it short.+ 5. **Create a new environment** with EMAN2 dependencies. //eman2// below is the name of the environment. You may make this whatever you like, as long as you remember to use the same name when doing //conda activate//. Note that this name will appear as part of your prompt when activated, so you may want to keep it short.
  
  
Line 91: Line 92:
 </code> </code>
  
 + **ARM-64 Linux** - At present this requires some special tricks. See section below.
 + **List of dependencies: ** (Not required for normal installation)If you wish to see the list of conda dependencies that **eman-dev** is built from, look [[https://github.com/cryoem/eman-feedstock/blob/master/recipe/meta.yaml|here]]. Some of the dependency versions are listed in the appropriate file under [[https://github.com/cryoem/eman-feedstock/tree/master/.ci_support|.ci_support]].
  
- **List of dependencies: **If you wish to see the list of conda dependencies that **eman-dev** is built from, look [[https://github.com/cryoem/eman-feedstock/blob/master/recipe/meta.yaml|here]]. Some of the dependency versions are listed in the appropriate file under [[https://github.com/cryoem/eman-feedstock/tree/master/.ci_support|.ci_support]]. 
  
- + 6. Ensure you have **OpenGL**:
-  Ensure you have **OpenGL**:+
   EMAN2 uses OpenGL (via !PyQt) for all of its graphics. OpenGL installation depends on OS variant and, for example, whether you are using proprietary NVidia drivers under Linux. You will need to have OpenGL set up on your machine as a whole before continuing. On Mac, you should already have this with XCode. On Linux with an NVidia driver you will likely also need to install the Mesa header files. If you aren't sure how to set up OpenGL, Google can probably help.   EMAN2 uses OpenGL (via !PyQt) for all of its graphics. OpenGL installation depends on OS variant and, for example, whether you are using proprietary NVidia drivers under Linux. You will need to have OpenGL set up on your machine as a whole before continuing. On Mac, you should already have this with XCode. On Linux with an NVidia driver you will likely also need to install the Mesa header files. If you aren't sure how to set up OpenGL, Google can probably help.
  
-  - **Get EMAN code** from [[https://github.com/cryoem/eman2|GitHub:cryoem/eman2]].+ 7. **Get EMAN code** from [[https://github.com/cryoem/eman2|GitHub:cryoem/eman2]].
  <code>#!highlight bash  <code>#!highlight bash
 cd <path-where-you-want-eman2-source>   # eg - $HOME/src cd <path-where-you-want-eman2-source>   # eg - $HOME/src
Line 104: Line 105:
 </code> </code>
  
-  - **Create a build directory** (out-of-source builds are recommended).+ 8. **Create a build directory** (out-of-source builds are recommended).
  <code>#!highlight bash  <code>#!highlight bash
 mkdir <build-directory> # eg- $HOME/src/eman2-build mkdir <build-directory> # eg- $HOME/src/eman2-build
 </code> </code>
-  - **GPU/deep learning** Install JAX per the next section for GPU support. JAX is required for virtually all of the new EMAN3 programs + 9. **GPU/deep learning** Install JAX per the next section for GPU support. JAX is required for virtually all of the new EMAN3 programs 
  
 ===== GPU Aceleration & Deep Learning ===== ===== GPU Aceleration & Deep Learning =====
Line 121: Line 122:
     * Instead, we strongly suggest just installing JAX using pip:     * Instead, we strongly suggest just installing JAX using pip:
       * conda activate eman2       * conda activate eman2
-      * Linux (NVIDIA): pip install "jax[cuda12]"      +      * Linux (NVIDIA): pip install "jax[cuda12] optax     
-      * Other (cpu): pip install jax+      * Other (cpu): pip install jax optax
     * see [[https://pypi.org/project/jax/]] for up to date JAX instructions, this may change more frequently than this page is updated     * see [[https://pypi.org/project/jax/]] for up to date JAX instructions, this may change more frequently than this page is updated
  
Line 129: Line 130:
 When you start a new shell, these are the steps you will need to take before running EMAN programs or compiling the system: When you start a new shell, these are the steps you will need to take before running EMAN programs or compiling the system:
  
-  - **Activate** your environment. If you used a different name above, use it here too.+ 10. **Activate** your environment. If you used a different name above, use it here too.
  <code>#!highlight bash  <code>#!highlight bash
 conda activate eman2 conda activate eman2
 </code> </code>
  
-  - **Update and Checkout source code**. Periodically you should update your source using standard git techniques.+ 11. **Update and Checkout source code**. Periodically you should update your source using standard git techniques.
  <code>#!highlight bash  <code>#!highlight bash
 cd <source-directory>    # <path-where-you-want-eman2-source>/eman2 cd <source-directory>    # <path-where-you-want-eman2-source>/eman2
Line 142: Line 143:
 </code> </code>
  
-  - **CMake**+ 12. **CMake**
  <code>#!highlight bash  <code>#!highlight bash
 cd <build-directory> cd <build-directory>
Line 158: Line 159:
       * If you use **ccmake**, you may get an error related to OpenGL. If this happens try quitting ccmake and running it again.       * If you use **ccmake**, you may get an error related to OpenGL. If this happens try quitting ccmake and running it again.
  
-  - **Make**+ 13. **Make**
  <code>#!highlight bash  <code>#!highlight bash
 make -j 8 make -j 8
Line 175: Line 176:
   * note: "make test" is not recommended for individual installs, this tool is primarily aimed at developers making changes in the core of the system. It is not uncommon for one or more tests to fail, and there is no need to report such failures. In most cases this is a problem with the test, not a problem with the system.   * note: "make test" is not recommended for individual installs, this tool is primarily aimed at developers making changes in the core of the system. It is not uncommon for one or more tests to fail, and there is no need to report such failures. In most cases this is a problem with the test, not a problem with the system.
  
-  - **Other Environments**. To switch to another conda environment (stop working with EMAN2), first deactivate your current environment.+ 14. **Other Environments**. To switch to another conda environment (stop working with EMAN2), first deactivate your current environment.
  <code>#!highlight bash  <code>#!highlight bash
 conda deactivate conda deactivate
 </code> </code>
  
-==== Troubleshooting ====+===== ARM-64 Linux ===== 
 +We have not managed to integrate builds for ARM64 Linux (including RaspberryPi) into the conda-forge build system at present. Building from source will also require some extra effort because the eman-dev package isn't available.  
 + 
 +This will create an environment with most of the dependencies: 
 +<code> 
 +mamba create -n eman2 biopython boost cmake configparser fftw freetype ftgl future gsl hdf5 ipython ipywidgets jupyterlab libfreetype libfreetype6 libgcc libpng libstdcxx libtiff libzlib matplotlib nodejs numpy pandas python==3.12 scikit-learn scipy tqdm umap-learn zlib 
 +</code> 
 +this excludes tensorflow, jax and pydusa. Pydusa isn't really used much in EMAN2 any more (provides MPI support), with most parallelism being either threading or via CUDA through Tensorflow or JAX. JAX and Tensorflow are not required for compilation, but will need to be installed for some programs to function. 
 + 
 +With this environment it should be possible to follow the instructions above beginning with cloning EMAN2 from GitHub and install functional binaries. 
 + 
 +===== Troubleshooting =====
 Solutions to potential known problems will be listed here. If these don't help, please report your problem (http://groups.google.com/group/eman2): Solutions to potential known problems will be listed here. If these don't help, please report your problem (http://groups.google.com/group/eman2):
  
Line 201: Line 213:
 Please, provide the output of the following commands when reporting a problem. Record the session via **script** command. This, also, records the commands, and you can just submit the full text file with your problem report. Please, provide the output of the following commands when reporting a problem. Record the session via **script** command. This, also, records the commands, and you can just submit the full text file with your problem report.
  
-  - <code>#!highlight bash+ 1. <code>#!highlight bash
 script filename.txt script filename.txt
  
Line 231: Line 243:
 </code> </code>
  
-  - Send **filename.txt**.+ 2. Send **filename.txt**.
  
  
eman2/install/sourceinstall.1749940395.txt.gz · Last modified: by steveludtke