Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
1_0:external-tools [2020/05/05 14:23]
admin [Python]
1_0:external-tools [2025/05/22 16:10] (current)
admin [CCP4 (Only for 2D crystallography projects)]
Line 11: Line 11:
 gawk is a more powerful version of the command-line utility awk. Install gawk on OSX with "brew install gawk". On Linux, try "sudo apt-get install gawk" gawk is a more powerful version of the command-line utility awk. Install gawk on OSX with "brew install gawk". On Linux, try "sudo apt-get install gawk"
  
-==== Python ==== +==== Python  and PILLOW ==== 
-Many utilities and specific-purpose tools used by FOCUS are written in the [[http://ww.python.org|Python]] scripting language (version 2.7.x). We recommend using a scientific Python installation like [[http://www.anaconda.com|Anaconda]] or [[http://www.enthought.com/product/canopy/|Canopy]]. You can also use the [[http://blake.bcm.edu/emanwiki/EMAN2|EMAN2.2]] Python environment based on Anaconda (see below).+Many utilities and specific-purpose tools used by FOCUS are written in the [[http://ww.python.org|Python]] scripting language. We recommend using a scientific Python installation like [[http://www.anaconda.com|Anaconda]] or [[http://www.enthought.com/product/canopy/|Canopy]]. You can also use the [[http://blake.bcm.edu/emanwiki/EMAN2|EMAN2.2]] Python environment based on Anaconda (see below).
  
 You also need **pip** and the module **pil** (or **pillow**).  You also need **pip** and the module **pil** (or **pillow**). 
Line 18: Line 18:
 On OSX, try  On OSX, try 
  
-<nowiki> +  * xcode-select --install 
-     xcode-select --install +  * brew install python3 
-</nowiki>+  * brew install pillow 
 +  * brew install python-matplotlib 
 +  * brew install numpy
  
-<nowiki> +or alternatively:
-     brew install python2.7 +
-</nowiki>+
  
-<nowiki> +  * pip3 install pillow
-     pip2 install pillow +
-</nowiki>+
  
 On Linux, try: On Linux, try:
   * apt-get install python2.7 (or //yum install python2.7//)   * apt-get install python2.7 (or //yum install python2.7//)
-  * pip install pillow+  * apt-get install python3 
 +  * pip3 install pillow 
 +  * pip3 install matplotlib 
 + 
 +and make sure in the Preferences panel of FOCUS, that FOCUS is using the correct version of python, which may reside in /usr/local/bin/python3  or  in /opt/homebrew/bin/python3 
 + 
 +Or to install those in python2.7:  
 +  * /usr/bin/python -mpip install -U pillow 
 +  * /usr/bin/python -mpip install -U matplotlib
  
-and make sure in the Preferences panel of FOCUS, that FOCUS is using this python2.7 binary, which may reside in /usr/local/bin/python2.7 
  
 ==== MRCZ ==== ==== MRCZ ====
 Many of the Python scripts called within FOCUS rely on the [[http://github.com/em-MRCZ/python-mrcz|Python-MRCZ]] module. You can install ''mrcz'' in your Python environment with the following ''pip'' command: Many of the Python scripts called within FOCUS rely on the [[http://github.com/em-MRCZ/python-mrcz|Python-MRCZ]] module. You can install ''mrcz'' in your Python environment with the following ''pip'' command:
  
-''pip install mrcz''+''pipx install mrcz''
  
 Please ensure you have a version >= 0.5.1 of ''mrcz''. Please ensure you have a version >= 0.5.1 of ''mrcz''.
Line 46: Line 51:
 For accelerating some heavy calculations in Python scripts, FOCUS uses the [[https://numexpr.readthedocs.io|NumExpr]] evaluator. You can install ''numexpr'' in your Python environment with the following ''pip'' command: For accelerating some heavy calculations in Python scripts, FOCUS uses the [[https://numexpr.readthedocs.io|NumExpr]] evaluator. You can install ''numexpr'' in your Python environment with the following ''pip'' command:
  
-''pip install numexpr''+  * pipx install numexpr 
 + 
 +or alternatively on OSX: 
 + 
 +  * brew install numexpr
  
 ==== EMAN2 ==== ==== EMAN2 ====
-[[http://blake.bcm.edu/emanwiki/EMAN2|EMAN2]]  is a great package with lots of tools available. We might not use the tools present in EMAN2 directly, but we definitely use python distribution attached with the source. EMAN2 is easy to install and is available for MacOS and Linux on their website: http://blake.bcm.edu/emanwiki/EMAN2+[[http://blake.bcm.edu/emanwiki/EMAN2|EMAN2]]  is a great package with lots of tools available. 
  
-If you want to use the EMAN2 python (that is python 2.7), then you can link that python in the FOCUS Preferences dialogue, on **MacOS** for example as  /Applications/EMAN2/bin/python2.7 (or, where-ever you installed EMAN2). +We might not use the tools present in EMAN2 directly, but it is very helpful 
 +EMAN2 is easy to install and is available for MacOS and Linux on their website: http://blake.bcm.edu/emanwiki/EMAN2
  
-If you compile FOCUS from source (which is recommended), sure that the ''build_all'' script does not accidentally use the EMAN2 version of qmake. You can test this by typing in a terminal ''which qmake'', or ''qmake ''''-''''-version'', to see, which qmake shows up first in your path. If the EMAN2 qmake is taken first, you might want to rename that to a different qmake name, such as "qmake-4.8.7".+If you compile FOCUS from source (which is recommended), make sure that the ''build_all'' script does not accidentally use the EMAN2 version of qmake. You can test this by typing in a terminal ''which qmake'', or ''qmake ''''-''''-version'', to see, which qmake shows up first in your path. If the EMAN2 qmake is taken first, you might want to rename that to a different qmake name, such as "qmake-4.8.7".
 ==== IMOD ==== ==== IMOD ====
 We directly use many command line utilities present in IMOD. It can be downloaded from the website: http://bio3d.colorado.edu/imod/ We directly use many command line utilities present in IMOD. It can be downloaded from the website: http://bio3d.colorado.edu/imod/
  
 ==== CCP4 (Only for 2D crystallography projects) ==== ==== CCP4 (Only for 2D crystallography projects) ====
-Focus uses CCP4 in order to generate merged maps of the protein in 2D crystallography projects. The software can be downloaded from http://www.ccp4.ac.uk/download.php. Please follow their installation guide.+Focus uses CCP4 in order to generate merged maps of the protein in 2D crystallography projects. The software can be downloaded from  
 + 
 +  * https://www.ccp4.ac.uk/download  
 + 
 +Please follow their installation guide.
  
 ===== Software for drift correction ===== ===== Software for drift correction =====