User Tools

Site Tools


eman2:install:binaryinstallanaconda_2.99

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eman2:install:binaryinstallanaconda_2.99 [2025/07/06 16:54] steveludtkeeman2:install:binaryinstallanaconda_2.99 [2025/07/06 18:16] (current) steveludtke
Line 9: Line 9:
 There are three ways to install EMAN2: There are three ways to install EMAN2:
  
- 1. Traditional Binary Installation (**Note: only Anaconda/Miniconda based binaries are now provided**+ 1. Traditional Binary Installation (This approach is deprecated now) 
-    * [[#Linux|Linux]] +    * Linux 
-    * [[#Mac|Mac]] +    * Mac 
-    * [[#WSL|Windows (WSL)]]+    * Windows (WSL2)
  
- 2. NEW: [[#Anaconda|Install into an existing Anaconda install]]+ 2. [[eman2:install:condainstall|Install into an existing Anaconda/MiniForge installation]] (preferred)
  
- 3. [[EMAN2:Install/SourceInstall|Install from GitHub (source build)]]+ 3. [[EMAN2:Install:SourceInstall|Install from GitHub (source build)]]
  
 If you are already an active [[https://anaconda.com|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. If you are already an active [[https://anaconda.com|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.
  
 ---- ----
-==== Option 2: Install into an existing Anaconda setup (all platforms, experimental) ==== +==== Option 1 (Linux)Standard Binary Install (deprecated) ====
-    * This method is still experimental. //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!+
  
- 4. **Update (optional):** You may wish to consider updating Anaconda before installing: +<note>The neural network code in EMAN2 works best on machines with Nvidia GPUs. For this to work, compatible Nvidia drivers, CUDA libraries and Tensorflow GPU support must be installed.</note>
- <code> +
-conda update --all +
-</code> +
- but consider possible impact on other Anaconda environments you may have configured. +
- 5. **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: +
- <code> +
-conda install mamba -c conda-forge +
-</code> +
- 6. **Install:** We strongly recommend installing EMAN2 within its own Anaconda/Miniconda [[https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html|environement]]: +
- <code> +
-conda create -n eman2 eman-dev==2.99.47 -c cryoem -c conda-forge +
-</code> +
- +
- 7. **M1/M2 Macs (Optional):** initial support for Tensorflow on the GPU is available via PyPi, but not conda. +
- <code> +
-# with the eman2 environment activated +
-pip install tensorflow-metal +
-</code> +
- 8. **Linux:** see the [[#GPU|GPU]] section below. +
- 9. **Activate to Use:** Any time you want to use EMAN2 you will need to first activate the correct environment. You can deactivate when done. +
- <code> +
-conda activate eman2 +
-</code> +
- 10. Run these programs to see if the install worked: +
- <code>#!highlight bash +
-# 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 +
-</code> +
- +
----- +
-==== Option 1 (Linux): Standard Binary Install ==== +
- +
-<code>#!wiki note +
-The neural network code in EMAN2 works best on machines with Nvidia GPUs. For this to work, compatible Nvidia drivers, CUDA libraries and Tensorflow GPU support must be installed. +
-</code>+
  
- 11. Cleanup: **Only if you have an old pre-Anaconda install of EMAN2 on your machine**:+ 1. Cleanup: **Only if you have an old pre-Anaconda install of EMAN2 on your machine**:
     * Please remove or rename any existing installed EMAN2 folder you might have.     * Please remove or rename any existing installed EMAN2 folder you might have.
     * Please remove any existing EMAN2 entries from PATH.     * Please remove any existing EMAN2 entries from PATH.
     * LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PYTHONPATH and PYTHONHOME are NO LONGER USED, and should be removed if you have them set.     * LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PYTHONPATH and PYTHONHOME are NO LONGER USED, and should be removed if you have them set.
     * If you have any of these shell variables set for use with other software, it may be necessary to remove those settings as well. If the tests below fail after installation, this is the first thing to check.     * If you have any of these shell variables set for use with other software, it may be necessary to remove those settings as well. If the tests below fail after installation, this is the first thing to check.
- 12. **Download:** [[https://cryoem.bcm.edu/cryoem/downloads/view_eman2_version/33|Download EMAN2.99.47]] + 
- 13. **Install:** + 2. **Download:** [[https://cryoem.bcm.edu/cryoem/downloads/view_eman2_version/33|Download EMAN2.99.47]] 
- <code>#!highlight bash+ 
 + 3. **Install:** 
 + <code bash>
 bash <path-to-EMAN2-installer> bash <path-to-EMAN2-installer>
 </code> </code>
Line 84: Line 40:
     * You will be asked if you want to initialize EMAN2 (conda init). Answer yes, or you won't have access to the 'conda' command in your shell.     * You will be asked if you want to initialize EMAN2 (conda init). Answer yes, or you won't have access to the 'conda' command in your shell.
     * EMAN2 initialization will add a block of code to your //.profile/.bashrc/.zshrc// file. You may check this file after installation to make sure an Anaconda block exists.     * EMAN2 initialization will add a block of code to your //.profile/.bashrc/.zshrc// file. You may check this file after installation to make sure an Anaconda block exists.
- 14. **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. + 
- 15. **Test:** Run these programs to see if the install worked: + 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. 
- <code>#!highlight bash+ 
 + 5. **Test:** Run these programs to see if the install worked: 
 + <code bash>
 # This will display the exact version you have installed. If you ask for help, provide the full output of this command. # This will display the exact version you have installed. If you ask for help, provide the full output of this command.
 e2version.py e2version.py
Line 100: Line 58:
  
 ==== Troubleshooting and Tips ==== ==== Troubleshooting and Tips ====
-  * If you have an NVidia graphics card, see [[#GPU|//Using the GPU//]] section below.+  * If you have an NVidia graphics card, see //Using the GPU// section below.
  
-  * If you receive an "Illegal Instruction" crash, this usually means your CPU isn't compatible with the binaries. You can try a snapshot version instead of the release and see if that helps, but if still having issues, we suggest you [[EMAN2:Install/SourceInstall|build from source]]. It's a lot easier than it sounds, and will produce binaries optimized for your specific computer.+  * If you receive an "Illegal Instruction" crash, this usually means your CPU isn't compatible with the binaries. You can try a snapshot version instead of the release and see if that helps, but if still having issues, we suggest you [[EMAN2:Install:SourceInstall|build from source]]. It's a lot easier than it sounds, and will produce binaries optimized for your specific computer.
   * If you get an error like the one below, dependency installation step might have failed. <code>   * If you get an error like the one below, dependency installation step might have failed. <code>
 Traceback (most recent call last): Traceback (most recent call last):
Line 117: Line 75:
     * If this causes issues for other software, you can type <code>conda deactivate</code> and EMAN2 commands will no longer work (but any software that doesn't like Anaconda will work).     * If this causes issues for other software, you can type <code>conda deactivate</code> and EMAN2 commands will no longer work (but any software that doesn't like Anaconda will work).
     * Alternatively, you can type <code>conda config --set auto_activate_base False</code>, which will prevent Anaconda from being activated automatically when you open new shells. In that case you will need to do a <code>conda activate</code> before running EMAN2/SPARX/SPHIRE commands.     * Alternatively, you can type <code>conda config --set auto_activate_base False</code>, which will prevent Anaconda from being activated automatically when you open new shells. In that case you will need to do a <code>conda activate</code> before running EMAN2/SPARX/SPHIRE commands.
-  * Check continuous build sections, [[EMAN2:Install/BinaryInstallAnaconda#ContinuousBuild-Notes|Notes]] and [[EMAN2:Install/BinaryInstallAnaconda#ContinuousBuild-Troubleshooting|Troubleshooting]], which may contain more up-to-date info that may be relevant here.+  * Check continuous build sections, [[EMAN2:Install:BinaryInstallAnaconda|Notes and Troubleshooting]], which may contain more up-to-date info that may be relevant here.
  
 ---- ----
Line 123: Line 81:
 **//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).  **//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). 
  
- 16. Cleanup: **Only if you have a pre-Anaconda install of EMAN2 on your machine**:+ 1. Cleanup: **Only if you have a pre-Anaconda install of EMAN2 on your machine**:
     * Please remove or rename any existing installed EMAN2 folder you might have.     * Please remove or rename any existing installed EMAN2 folder you might have.
     * Please remove any existing EMAN2 entries from PATH.     * Please remove any existing EMAN2 entries from PATH.
     * LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PYTHONPATH and PYTHONHOME are NO LONGER USED, and should be removed if you have them set.     * LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PYTHONPATH and PYTHONHOME are NO LONGER USED, and should be removed if you have them set.
     * If you have any of these shell variables set for use with other software, it may be necessary to remove those settings as well. If the tests below fail after installation, this is the first thing to check.     * If you have any of these shell variables set for use with other software, it may be necessary to remove those settings as well. If the tests below fail after installation, this is the first thing to check.
- 17. **Download:** [[https://cryoem.bcm.edu/cryoem/downloads/view_eman2_version/33|Download EMAN2.99.47]] + 2. **Download:** [[https://cryoem.bcm.edu/cryoem/downloads/view_eman2_version/33|Download EMAN2.99.47]] 
- 18. **Install:** + 
- <code>#!highlight bash+ 3. **Install:** 
 + <code bash>
 bash <path-to-EMAN2-installer> bash <path-to-EMAN2-installer>
 </code> </code>
Line 136: Line 95:
     * You will be asked if you want to initialize EMAN2 (conda init). Answer yes, or you won't have access to the 'conda' command in your shell.     * You will be asked if you want to initialize EMAN2 (conda init). Answer yes, or you won't have access to the 'conda' command in your shell.
     * EMAN2 initialization will add a block of code to your //.profile/.bashrc/.zshrc// file. You may check this file after installation to make sure an Anaconda block exists.     * EMAN2 initialization will add a block of code to your //.profile/.bashrc/.zshrc// file. You may check this file after installation to make sure an Anaconda block exists.
- 19. 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//+ 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//
- 20. **Test:** Run these programs to see if the install worked: + 
- <code>#!highlight bash+ 5. **Test:** Run these programs to see if the install worked: 
 + <code bash>
 # This will display the exact version you have installed. If you ask for help, provide the full output of this command. # This will display the exact version you have installed. If you ask for help, provide the full output of this command.
 e2version.py e2version.py
Line 171: Line 131:
  
 ---- ----
-==== Windows 10/11 WSL ====+==== Windows 10/11 WSL2 ====
 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: 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:
 [[https://learn.microsoft.com/en-us/windows/wsl/install|WSL]] [[https://learn.microsoft.com/en-us/windows/wsl/install|WSL]]
Line 179: Line 139:
  
 ==== Windows Native ==== ==== Windows Native ====
-We are no longer consistently 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.+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.
  
 ==== Windows 10 Legacy WSL ==== ==== Windows 10 Legacy WSL ====
-**If you are running an out of date WSL environment**, you really should update then follow the WSL instructions above. However, these older instructions may be useful if you try to proceed:+**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. 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.
Line 190: Line 150:
 </code> </code>
  
- 21. Click "Start" and type "Turn Windows Features on or off".+ 1. Click "Start" and type "Turn Windows Features on or off".
       * Enable "Windows Subsystem for Linux".       * Enable "Windows Subsystem for Linux".
       * Enable "Virtual Machine Platform".       * Enable "Virtual Machine Platform".
Line 196: Line 156:
  {{http://blake.bcm.edu/dl/EMAN2/Windows Features.png||width=600}}  {{http://blake.bcm.edu/dl/EMAN2/Windows Features.png||width=600}}
  
- 22. Install Ubuntu from "Microsoft Store".+ 2. Install Ubuntu from "Microsoft Store".
  
  {{http://blake.bcm.edu/dl/EMAN2/Windows Store - Ubuntu.png||width=600}}  {{http://blake.bcm.edu/dl/EMAN2/Windows Store - Ubuntu.png||width=600}}
  
- 23. Run "Ubuntu" from Start Menu.+ 3. Run "Ubuntu" from Start Menu.
  
- 24. Install OpenGL. + 4. Install OpenGL. 
- <code>#!highlight bash+ <code bash>
 sudo apt update 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 install libsm-dev libxrender-dev build-essential libgl1-mesa-dev mesa-utils mesa-common-dev libglu1-mesa libglu1-mesa-dev mesa-utils
Line 209: Line 169:
 </code> </code>
  
- 25. Install [[https://sourceforge.net/projects/xming/|Xming X Server for Windows]].+ 5. Install [[https://sourceforge.net/projects/xming/|Xming X Server for Windows]].
     * Don't forget the fonts and Mesa (OpenGL) modules! If it seems to work, but the letters are black boxes, or you have other visual artifacts, the problem is probably with OpenGL support.     * Don't forget the fonts and Mesa (OpenGL) modules! If it seems to work, but the letters are black boxes, or you have other visual artifacts, the problem is probably with OpenGL support.
  
- 26. Download and install LINUX binary, not windows binary! [[https://cryoem.bcm.edu/cryoem/downloads/view_eman2_version/33|Download EMAN2.99.47]], [[#Linux]].+ 6. Download and install LINUX binary, not windows binary! [[https://cryoem.bcm.edu/cryoem/downloads/view_eman2_version/33|Download EMAN2.99.47]], [[#Linux]].
  <code>#!wiki note  <code>#!wiki note
 Make sure to follow the instructions for shell initialization using `conda-init`. Make sure to follow the instructions for shell initialization using `conda-init`.
 </code> </code>
  
- 27. Start X Server and set environment variables. + 7. Start X Server and set environment variables. 
- <code>#!highlight bash+ <code bash>
 export DISPLAY=:0 export DISPLAY=:0
 glxinfo | grep OpenGL glxinfo | grep OpenGL
Line 226: Line 186:
  
  
- 28. Run these programs to see if the install worked: + 8. Run these programs to see if the install worked: 
- <code>#!highlight bash+ <code bash>
 e2version.py e2version.py
 e2speedtest.py e2speedtest.py
Line 238: Line 198:
 ---- ----
 ==== Using NVidia GPUs ==== ==== Using NVidia GPUs ====
-Currently, GPUs are only used for a few specific programs involving deep learning, such as tomogram annotation, particle picking and GMM variability analysis. +<note>In this release, GPUs were only used for a few specific programs involving deep learning, such as tomogram annotation, particle picking and GMM variability analysis. Strongly suggest installing a current snapshot instead.</note>
  
 This support is limited to Linux, and (potentially with some extra effort) Win 11 with an LSW2 installation. 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:+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:
 <code> <code>
 # Make sure you have your environment set to run EMAN2 programs # Make sure you have your environment set to run EMAN2 programs
Line 255: Line 215:
       * Installation depends on linux distribution, try your package manager for CUDA and/or CUDA-toolkit, for example, on Ubuntu:       * Installation depends on linux distribution, try your package manager for CUDA and/or CUDA-toolkit, for example, on Ubuntu:
  
-   <code>+<code>
 apt-get install nvidia-cuda-toolkit apt-get install nvidia-cuda-toolkit
 </code> </code>
   * If the version of CUDA you have installed is incompatible, then you will need to get a compatible tensorflow installed in your Anaconda environment. Here is one possible suggestion:   * If the version of CUDA you have installed is incompatible, then you will need to get a compatible tensorflow installed in your Anaconda environment. Here is one possible suggestion:
- <code>+<code>
 conda remove tensorflow-gpu tensorflow-gpu-base conda remove tensorflow-gpu tensorflow-gpu-base
 pip install tensorflow pip install tensorflow
eman2/install/binaryinstallanaconda_2.99.1751820845.txt.gz · Last modified: by steveludtke