网页 综合 更新时间 2026-11-14 09:56:21

Installing HyperSpy — HyperSpy 2.5.0 documentation

自动蜘蛛 hyperspy.org 正文约 4453 字
Fundamentals and Usage
The easiest way to install HyperSpy is to use the HyperSpy Bundle, which is available on Windows, MacOS and Linux.
Alternatively, HyperSpy can be installed in an existing python distribution, read the conda installation and pip installation sections for instructions.
To enable the context-menu (right-click) shortcut in a chosen folder, use the start_jupyter_cm tool.
If you want to be notified about new releases, please Watch (Releases only) the hyperspy repository on GitHub (requires a GitHub account).
Since version 0.8.4 HyperSpy only supports Python 3. If you need to install HyperSpy in Python 2.7 install HyperSpy 0.8.3.
The HyperSpy bundle is very similar to the Anaconda distribution, and it includes:
context menu shortcut (right-click) to Jupyter Notebook, Qtconsole or JupyterLab
For instructions, see the HyperSpy bundle repository.
A portable version of the HyperSpy bundle based on the WinPython distribution is also available on Windows.
Conda is a package manager for Anaconda-like distributions, such as the Miniforge or the HyperSpy-bundle. Since HyperSpy is packaged in the conda-forge channel, it can easily be installed using conda.
To install HyperSpy run the following from the Anaconda Prompt on Windows or from a Terminal on Linux and Mac.
This will also install the optional GUI packages hyperspy_gui_ipywidgets and hyperspy_gui_traitsui. To install HyperSpy without the GUI packages, use:
Depending on how Anaconda has been installed, it is possible that the conda command is not available from the Terminal, read the Anaconda User Guide for details.
Using -c conda-forge is only necessary when the conda-forge channel is not already added to the conda configuration, read the conda-forge documentation for more details.
Depending on the packages installed in Anaconda, conda can be slow and in this case mamba can be used as an alternative of conda since the former is significantly faster. Read the mamba documentation for instructions.
When installing packages, conda will verify that all requirements of all packages installed in an environment are met. This can lead to situations where a solution for dependencies resolution cannot be resolved or the solution may include installing old or undesired versions of libraries. The requirements depend on which libraries are already present in the environment as satisfying their respective dependencies may be problematic. In such a situation, possible solutions are:
use Miniconda instead of Anaconda, if you are installing a python distribution from scratch: Miniconda only installs very few packages so satisfying all dependencies is simple.
install HyperSpy in a new environment. The following example illustrates how to create a new environment named hspy_environment, activate it and install HyperSpy in the new environment.
A consequence of installing hyperspy in a new environment is that you need to activate this environment using conda activate environment_name where environment_name is the name of the environment, however shortcuts can be created using different approaches:
Install start_jupyter_cm in the hyperspy environment.
Install nb_conda_kernels.
Create IPython kernels for different environment.
To learn more about the Anaconda eco-system:
Choose between Anaconda or Miniconda?
Understanding conda and pip.
What is conda-forge.
HyperSpy is listed in the Python Package Index. Therefore, it can be automatically downloaded and installed pip. You may need to install pip for the following commands to run.
To install all of HyperSpy’s functionalities, run:
To install only the strictly required dependencies and limited functionalities, use:
See the following list of selectors to select the installation of optional dependencies required by specific functionalities:
image to install scikit-image for image processing functionalities, such as subpixel align2D(), find_peaks() and unwrapped_phase().
ipython for integration with the ipython terminal and parallel processing using ipyparallel,
learning for some machine learning features,
odr for weighted orthogonal distance regression (ODR) fitting using the odrpack95 library,
gui-jupyter to use the Jupyter widgets GUI elements,
gui-traitsui to use the GUI elements based on traitsui,
speed install numba and numexpr to speed up some functionalities,
tests to install required libraries to run HyperSpy’s unit tests,
coverage to coverage statistics when running the tests,
访问原文 返回搜索 https://hyperspy.org/hyperspy-doc/current/user_guide/install.html
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。