Installation by Pip¶
In order to install the program, you need to install python 2.7 or 3.6.
Preparing¶
There are some modules need to be installed before installing Muscle X. They are Pip, OpenCV, PyQT4 or PyQT5, gfortran, PyFAI and Cython.
Linux¶
sudo apt-get update
sudo apt-get install python-pip libjpeg-dev libopencv-dev python-opencv python-qt4 cython pyfai gfortran
Mac OS¶
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install opencv
brew install cartr/qt4/pyqt
brew install gcc
sudo easy_install pip
sudo pip install pyfai
sudo pip install cython
Windows¶
For windows, we have built the Fortran source for you, so Fortran compiler is not required. But C compiler is still required to build C extensions during the installation process, and Microsoft Visual C++ (MSVC) is recommended.
Python 2.7 on Windows¶
The default MSVC chosen by Python 2.7 is MSVC 9.0. We recommend forcing the use of MSVC 14.0 instead. Follow the steps below.
- Uninstall Microsoft Visual C++ Compiler for Python 2.7 (MSVC 9.0) If Microsoft Visual C++ Compiler for Python 2.7 is installed, uninstall it (See Repair or remove programs in Windows 10).
- Install Microsoft Build Tools 2015 Update 3 (MSVC 14.0) The minimal customized installation of Microsoft Build Tools 2015 Update 3 is not enough. Make sure Windows SDK (8.1 or 10) is included.
- Temporarily set environment variable
VS90COMNTOOLS
Type the following command in your current cmd prompt:set VS90COMNTOOLS=%VS140COMNTOOLS%
Then install dependencies:
pip install numpy cython python-qt5 opencv-python pyfai
Python 3.6 on Windows¶
The default MSVC chosen by Python 3.6 is MSVC 14.0. The minimal customized installation of Microsoft Build Tools 2015 Update 3 is enough. Then install dependencies:
pip install cython numpy pyqt5 opencv-python pyfai
Note
Omit keyword sudo in the commands in following parts when working on Windows.
Running a program¶
Simply run
musclex [program shortcut]
For example, run this command to run Diffraction-Centroids
musclex dc
If you get ImportError: C extension: iNaT not built. If you want to import pandas from the source directory, you may need to run ‘python setup.py build_ext –inplace –force’ to build the C extensions first while you’re running the program, please re-install pandas by
pip install -U pandas
Updating¶
sudo pip install -U musclex
if you do not need to update other dependencies, you can run
sudo pip install -U --no-deps musclex