Preparing for pycroscopy¶
Pycroscopy requires many commonly used scientific and numeric python packages such as numpy, h5py etc. To simplify the installation process, we recommend the installation of Anaconda which contains most of the prerequisite packages, conda - a package / environment manager, as well as an interactive development environment - Spyder.
Do you already have Anaconda installed?
- No? Download and install Anaconda for Python 3.6
- Yes? Is your Anaconda based on python 2.7, 3.4+?
- No? Uninstall existing Python / Anaconda distribution(s). Restart computer afterwards.
- Yes? Proceed to install pycroscopy
- Pycroscopy was initially developed in python 2 but all current / future development for pycroscopy will be on python 3.5+. Nonetheless, we will do our best to ensure continued compatibility with python 2.
- We currently do not support 32 bit architectures
- We only support text that is UTF-8 compliant due to restrictions posed by HDF5
Once the appropriate Anaconda distribution has been successfully installed, pycroscopy can be installed easily either via the python package index (pypi / pip) or conda-forge (conda).
Open a terminal (mac / linux) or command prompt (windows - be sure to install in a location where you have write access. Don’t install as administrator unless you are required to do so.) and type:
pip install pycroscopy
First, open a terminal / command window. Add conda-forge to your channels with:
conda config --append channels conda-forge
Once the conda-forge channel has been enabled, pycroscopy can be installed with:
conda install pycroscopy
Installing a legacy version¶
The latest version of pycroscopy (as of May 2018) has been thoroughly revamped and is likely to have caused some incompatibilities in your existing code. In order to go back to / install the last version of pycroscopy before this major revision, please use the following commands in a terminal:
pip install pycroscopy==0.59.8
Installing from a specific branch (advanced users ONLY)¶
Here, we are installing pycroscopy from the latest development branch. Note that we do not recommend installing pycroscopy this way.
Before you can install pycroscopy, you need to install git.
conda install git
Once git has installed, you can install a specific branch of pycroscopy (
dev in this case):
pip install -U git+https://github.com/pycroscopy/pycroscopy@dev
We recommend periodically updating your anaconda distribution. To fully update run the following commands in a terminal / command window.
conda upgrade anaconda conda update --all
If you installed pycroscopy via conda, the last command should update pycroscopy as well.
Updating via pip¶
If you already have pycroscopy installed and want to update to the latest version, use the following command in a terminal / command window:
pip install -U --no-deps pycroscopy
If it does not work try reinstalling the package:
pip uninstall pycroscopy pip install pycroscopy
Updating via conda¶
If you installed pycroscopy via conda, open a terminal / command window and type:
conda update pycroscopy