Install MDSplus
MDSplus is the uniform data format for fusion research, however installing MDSplus package for python on linux is rather a boring work. Many bugs occurred. First you should download the MDSplus package [http://www.mdsplus.org/index.php?title=Downloads&open=147569449264929046577&page=Software%2FDownloads]. Here is some approach to install it. The python3 has been installed on the linux. First we follow the official instruction [http://www.mdsplus.org/index.php/Documentation:Users:MDSobjects:Python].
install MDsplus with conda
In the latest updates in 2019 Dec, the conda now includes the MDSplus package inside its online installation source. After installation Anaconda python release, you can simply use conda command to install the MDSplus for your python [https://anaconda.org/conda-forge/mdsplus].
Install MDSplus for python 3
1 | conda install -c conda-forge mdsplus |
Install MDSplus for python 2
1 | conda install -c conda-forge/label/cf201901 mdsplus |
Install with pip
1 | # Install via official MDSplus rpm packages/yum source. |
This approach will install the official MDSplus to the desired python version. But sometimes, the official MDSplus cause some error such as:
1 | Exception: Could not load library: Mdsdcl |
This kinds of bug almost makes me break down. And recently, I just found the conda and pip installation method just failed, because the package is no longer well supported.
Install by copying
You can also install it by coping the effective MDSplus python module to the site-package. I first copied the effective MDSplus package from my mac notebook. Then copy it to the similar location on Linux desktop. Then you can first install the MDSplus package for different computer system (Windows, MacOS, Linux) following instruction of the official website [https://www.mdsplus.org/index.php/Latest_RPM’s_and_Yum_repositories]. Then you can copy the installed MDSplus package for python to the site-package location of Anaconda python direction of your user directory. For an example, the YUM installed MDSplus python package can by copied to Anaconda python as:
1 | sudo yum install mdsplus |
The default installation location of MDSplus on Linux system is:
1 | /usr/local/mdsplus |
To install the MDSplus package for python, you can just copy the yum installed MDSplus python module package to the user home directory of Anaconda site-package location as:
1 | cp -r /usr/local/mdsplus/python/MDSplus /home/nan/anaconda3/lib/python3.9/site-packages/MDSplus |
After this step, you can check the success of python MDSplus package by import MDSplus module in python as:
1 | ipython |
If the python respond is OK, then your installation is correct.