Installation

Caution

Because JunPy is written by python and C++, we suggest running JunPy under linux envirement and anaconda will be more convenient to compile

Install for linux

Caution

If you want to install junpy in the public folder in linux, please change the status to root:

sudo su

which means the direction of the junpy’s environment in step 4 may just be like /opt/anaconda/envs/. If junpy just be installed in personal folder in linux, the direction may just be ~/.conda/envs

  1. Copy JunPy file in to linux system

  2. Direct to ./tools direction which has the file environment.yml

  3. Using anaconda or miniconda to create an envirement:

    conda env create -n <Envirement_Name> -f environment.yml
    
  4. Goback to home direction of JunPy package

  5. Activate the envirement:

    conda activate <Envirement_Name>
    
  6. Confirm current environment:

    which pip
    
  7. Enter following command in the terminal:

    export CC=gcc
    
  8. Enter following command in the terminal:

    export CXX=g++
    
  9. Enter following command in the terminal:

    pip install .
    
  10. If it success, it will start to install……

  11. After the installation, we can import junpy in python by using:

    import junpy as jp
    

Caution

If you cannot import JunPy, with error code:

      from mpi3py import MPI
ImportError: libmpi.so.12: cannot open shared object file: No such file or directioty

which mean the version of mpi4py is too old to use. Please reinstall the package by following command:

conda install -c conda-forge mpich

Notice

  1. If you want to modify the content of JunPy, please enter the following command to enter the developer mode:

    python setup.py develop
    

After enter this command, all the revises of JunPy will be timely response to the imported package

  1. We can also install JunPy through fowllowing command:

    python setup.py install
    

The relative content will be updated later, but we don’t suggention this method.

Install for windows

Caution

Not sure will do or not