I get the following error when Gatan Microscopy Suite® (GMS) software starts up, what should I do?
Answer: Most likely, when you upgraded GMS software from 3.4.0 to 3.4.1 or higher, you did not uninstall and reinstall Miniconda.GMS 3.4.0 uses an MKL-based NumPy installation.GMS 3.4.1 (and higher) requires an OpenBLAS-based NumPy library instead.
To solve this problem, reinstall the GMS virtual environment using GMS 188.8.131.5284 or higher. Any version of GMS before 3.4.1. 2984 requires you to uninstall Miniconda before reinstalling GMS with Python support.
How do I check what Python/NumPy version is used in GMS?
Answer: On startup, you can go to the Result window / Debug.
Which Python package manager should I use to install libraries on GMS Python Virtual environment?
Answer: In general, we recommend using pip install instead of conda install. GMS uses OpenBLAS-based (NumPy) libraries, and conda install tends to install MKL-based libraries.
I got this error when running a subsequent python script after using Scipy library in the first Python script, what should I do to solve this?
Answer: Some Python libraries (such as Scipy, require the script to be run in the main thread. Running a script (that requires it to be run in the main thread) in the background thread will cause the script to hang in the GMS-embedded Python. To solve this, first, try to use Ctrl + Shift + Q to try to kill the script that is running in the background. If this is not successful, you may need to restart GMS. To run these scripts intentionally, please uncheck the checkbox Execute on Background Thread option in the bottom right Python script window the next time you run the script.
Where is Miniconda installation, and where is GMS Python virtual environment installation?
Answer: The global (Miniconda) python is installed under C:\ProgramData\Miniconda3\.
GMS Python virtual environment is installed under C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON.
Can we run Python scripts in an external Python environment and call GMS for the internal functions?
Answer: GMS-Python API is dependent on the GMS application; therefore, it is not possible to execute GMS functions from python outside of the GMS application.
Why does GMS use Miniconda and not Anaconda?
Answer: We chose Miniconda as a starter since it is a small package, does not take long to install, and it gives users the option to expand it when needed by using the pip install commands.
Can I use some other Python software (not Miniconda)?
Answer: Yes, however, you do need to be careful about the versions that you are using. You should make sure you are using Python version 3.7.2 and NumPy version 1.18.2. Minor changes to Python (e.g., 3.7.x) and NumPy (e.g., 1.18.x) should also work but can’t be guaranteed. The default python used is Miniconda’s GMS Python Virtual environment (GMS_VENV_PYTHON). You can change to use some other Python software in the Global Info dialog (File / Global Info) and restart GMS.
Can I use my own (user-created) Python virtual environment with GMS?
Answer: No, a user-created Python virtual environment is not supported, and it will not appear in the Global Info dialog / General / Scripting / Python version drop-down selection for users to select.
How do I find out if OpenBLAS or MKL-based NumPy is installed in the GMS virtual environment?
(The example shown here is an OpenBLAS based NumPy installation.)Launch Anaconda in administrator modeActivate GMS_VENV_PYTHON virtual environment :(base) C:\WINDOWS\system32>activate GMS_VENV_PYTHONStart python interpreter:(GMS_VENV_PYTHON) C:\WINDOWS\system32>pythonPython 3.7.2 (default, Feb 21 2019, 17:35:59) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32Type "help", "copyright", "credits" or "license" for more information.>>> import numpy as np>>> numpy.showConfig()blas_mkl_info:NOT AVAILABLEblis_info:NOT AVAILABLEopenblas_info:library_dirs = ['C:\\projects\\numpy-wheels\\numpy\\build\\openblas_info']libraries = ['openblas_info']language = f77define_macros = [('HAVE_CBLAS', None)]blas_opt_info:library_dirs = ['C:\\projects\\numpy-wheels\\numpy\\build\\openblas_info']libraries = ['openblas_info']language = f77define_macros = [('HAVE_CBLAS', None)]lapack_mkl_info:NOT AVAILABLEopenblas_lapack_info:library_dirs = ['C:\\projects\\numpy-wheels\\numpy\\build\\openblas_lapack_info']libraries = ['openblas_lapack_info']language = f77define_macros = [('HAVE_CBLAS', None)]lapack_opt_info:library_dirs = ['C:\\projects\\numpy-wheels\\numpy\\build\\openblas_lapack_info']libraries = ['openblas_lapack_info']language = f77define_macros = [('HAVE_CBLAS', None)]
If I am using MKL-based libraries, how do I change to use OpenBLAS-based libraries for all packages (from Anaconda GMS_VENV_PYTHON prompt):
(GMS_VENV_PYTHON) C:\WINDOWS\system32>conda install conda-forge::blas=*=openblas
After invoking the above command, invoke “pip install XXX” where XXX is a python library.
How do I use the MKL-based library for NumPy?
Answer: You really shouldn’t, MKL-based libraries are not supported at this time. However, if you insist, you can use the following command.
(GMS_VENV_PYTHON) C:\WINDOWS\system32>conda install numpy
The conda package manager will update all other affected packages to use MKL-based packages.
Note the MKL-based NumPy is not supported, and we have observed problems when invoking FFT related functions.
How do I verify the conda environment is installed correctly via conda info or conda list?
Answer: The conda list will list out all packages info that are installed in the conda environment. There should not be errors in either of these commands.
(GMS_VENV_PYTHON) C:\WINDOWS\system32>conda infoactive environment : GMS_VENV_PYTHONactive env location : C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHONshell level : 2user config file : C:\Users\wlei\.condarcpopulated config files :conda version : 4.8.3conda-build version : not installedpython version : 3.7.1.final.0virtual packages : __cuda=9.2base environment : C:\ProgramData\Miniconda3 (writable)channel URLs : https://repo.anaconda.com/pkgs/main/win-64package cache : C:\ProgramData\Miniconda3\pkgsC:\Users\wlei\.conda\pkgsC:\Users\wlei\AppData\Local\conda\conda\pkgsenvs directories : C:\ProgramData\Miniconda3\envsC:\Users\wlei\.conda\envsC:\Users\wlei\AppData\Local\conda\conda\envsplatform : win-64user-agent : conda/4.8.3 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.18362administrator : Truenetrc file : Noneoffline mode : False
(GMS_VENV_PYTHON) C:\WINDOWS\system32>conda list# packages in environment at C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON:## Name Version Build Channel_tflow_select 2.2.0 eigenabsl-py 0.9.0 py37_0asn1crypto 1.3.0 py37_0astor 0.8.1 pypi_0 pypiblas 1.0 mkl…
I am using GMS 3.4.1. I am having some trouble installing Tensorflow 2.10. Is it supported by GMS 3.4.1?
Answer: Yes, it is supported. You will need to install all the pre-requisites before pip install tensorflow command:
The pre-requisites are: https://www.tensorflow.org/install/gpu
Visual Studio 2015-2019 x86 and x64 redistributable: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
Use pip install tensorflow to install the latest tensorflow (currently 2.10).
Sometimes, the user may see an error with the wrong h5py version, use pip uninstall h5py, and pip install h5py to install the required version.
When I try to use Ctrl + Shift + Q to kill a running script, I got the following error. What should I do?
Answer: Some operation in your script is holding onto the Python Global Interpreter Lock and not releasing it, preventing Ctrl + Shift + Q from terminating the script. If Ctrl + Shift + Q does not work, then you may need to restart GMS.