eman2:install:sourceinstall
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| eman2:install:sourceinstall [2025/06/30 02:24] – steveludtke | eman2:install:sourceinstall [2026/03/07 00:23] (current) – steveludtke | ||
|---|---|---|---|
| Line 22: | Line 22: | ||
| * IF you have conda-forge, | * IF you have conda-forge, | ||
| * Otherwise: | * Otherwise: | ||
| - | < | + | < |
| echo $PATH | echo $PATH | ||
| # make sure no Anaconda/ | # make sure no Anaconda/ | ||
| Line 38: | Line 38: | ||
| * Install: | * Install: | ||
| - | < | + | < |
| bash < | bash < | ||
| </ | </ | ||
| Line 47: | Line 47: | ||
| 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: | 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: | ||
| - | ## < | + | < |
| - | ## # for bash-like shells, such as bash and zsh | + | # for bash-like shells, such as bash and zsh |
| - | ## source < | + | source < |
| - | ## | + | |
| - | ## # for csh-like shells, such as csh and tcsh: | + | # for csh-like shells, such as csh and tcsh: |
| - | ## source < | + | source < |
| - | ## | + | |
| - | ## # < | + | # < |
| - | ## conda init < | + | conda init < |
| - | ## </ | + | </ |
| **You will need to close and reopen your shell/ | **You will need to close and reopen your shell/ | ||
| Line 63: | Line 63: | ||
| 4. **Configure and update conda.** | 4. **Configure and update conda.** | ||
| - | < | + | < |
| # 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 | ||
| conda config --set auto_activate_base False | conda config --set auto_activate_base False | ||
| Line 82: | Line 82: | ||
| - | < | + | < |
| - | mamba create -n eman2 eman-dev --only-deps | + | conda create -n eman2 eman-dev --only-deps -c conda-forge |
| </ | </ | ||
| If, and ONLY if, you are installing on a headless machine without graphics, you can alternatively set up the **non-GUI** variant which will not have pyqt and pyopengl. Doing this will severely limit EMAN2' | If, and ONLY if, you are installing on a headless machine without graphics, you can alternatively set up the **non-GUI** variant which will not have pyqt and pyopengl. Doing this will severely limit EMAN2' | ||
| - | < | + | < |
| - | mamba create -n eman2 ' | + | conda create -n eman2 ' |
| </ | </ | ||
| - | | + | |
| | | ||
| + | 6. **GPU Acceleration** EMAN2 increasingly leverages GPU acceleration on compatible machines, and moving forward we have moved from tensorflow to JAX. EMAN2 still includes some tensorflow code, and tensorflow should already have been installed as part of the configuration above. Given its rapid state of development we suggest installing JAX using pip instead: | ||
| + | |||
| + | Linux + NVidia GPU: | ||
| + | < | ||
| + | conda activate eman2 | ||
| + | pip install " | ||
| + | </ | ||
| + | |||
| + | Mac or other non-Nvidia: | ||
| + | < | ||
| + | conda activate eman2> | ||
| + | pip install jax optax | ||
| + | </ | ||
| - | 6. Ensure you have **OpenGL**: | + | 7. 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. | ||
| - | 7. **Get EMAN code** from [[https:// | + | 8. **Get EMAN code** from [[https:// |
| - | < | + | < |
| cd < | cd < | ||
| git clone https:// | git clone https:// | ||
| </ | </ | ||
| - | 8. **Create a build directory** (out-of-source builds are recommended). | + | 9. **Create a build directory** (out-of-source builds are recommended). |
| - | < | + | < |
| mkdir < | mkdir < | ||
| </ | </ | ||
| - | 9. **GPU/deep learning** Install JAX per the next section for GPU support. JAX is required for virtually all of the new EMAN3 programs | + | 10. **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 ===== | + | |
| - | Older EMAN2 programs make use of Tensorflow for Deep Learning/ | + | |
| - | + | ||
| - | * 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" | + | |
| - | + | ||
| - | * JAX | + | |
| - | * While it is possible to install JAX using conda/ | + | |
| - | * Instead, we strongly suggest just installing JAX using pip: | + | |
| - | * conda activate eman2 | + | |
| - | * Linux (NVIDIA): pip install " | + | |
| - | * Other (cpu): pip install jax optax | + | |
| - | * see [[https:// | + | |
| ===== Build and Install: Daily development, | ===== Build and Install: Daily development, | ||
| Line 131: | Line 130: | ||
| 10. **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. | ||
| - | < | + | < |
| conda activate eman2 | conda activate eman2 | ||
| </ | </ | ||
| 11. **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. | ||
| - | < | + | < |
| cd < | cd < | ||
| git fetch --all --prune | git fetch --all --prune | ||
| Line 144: | Line 143: | ||
| 12. **CMake** | 12. **CMake** | ||
| - | < | + | < |
| cd < | cd < | ||
| # on Mac: | # on Mac: | ||
| Line 177: | Line 176: | ||
| 14. **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. | ||
| - | < | + | < |
| conda deactivate | conda deactivate | ||
| </ | </ | ||
| - | ==== ARM-64 Linux ==== | + | ===== ARM-64 Linux ===== |
| - | We have not managed to integrate builds for ARM64 Linux (aarch-64) 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: | + | 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: | ||
| < | < | ||
| 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 | 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 | ||
| </ | </ | ||
| - | this excludes tensorflow, jax and pydusa. Pydusa isn't really used much in EMAN2 nowadays, with most parallelism being either threading or via CUDA through Tensorflow or JAX. | + | 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, |
| + | |||
| + | With this environment it should be possible to follow the instructions above beginning with cloning EMAN2 from GitHub and install functional binaries. | ||
| - | ==== Troubleshooting ==== | + | ===== Troubleshooting |
| Solutions to potential known problems will be listed here. If these don't help, please report your problem (http:// | Solutions to potential known problems will be listed here. If these don't help, please report your problem (http:// | ||
| + | * **Linux** | ||
| + | * On recent linux installs (2025+) when running a tensorflow program you may encounter an error like **ImportError: | ||
| + | * This command may help in some situations: //patchelf --clear-execstack $CONDA_PREFIX/ | ||
| * **macOS** Users (bash only) | * **macOS** Users (bash only) | ||
| * On macOS, installation modifies // | * On macOS, installation modifies // | ||
| Line 209: | Line 215: | ||
| 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. | ||
| - | 1. <code># | + | 1. <code bash> |
| script filename.txt | script filename.txt | ||
eman2/install/sourceinstall.1751250288.txt.gz · Last modified: by steveludtke
