Skip to content

How to install PyECLOUD

Dean Andrew Hidas edited this page Mar 30, 2020 · 40 revisions

Dependencies

PyECLOUD has been tested exclusively on Linux (mainly Ubuntu and SLC distributions).

To operate it needs the following general tools and libraries:

  • Python 3.7+
  • numpy
  • scipy
  • matplotlib (mainly for examples and tests)
  • cython
  • mpi4py (in case PyPARIS parallelization is needed)

Preparation of your python environment

If you are already working with the python scipy stack you can skip this section

Different options can be used to setup the working environment:

Install PyECLOUD and its friend libraries:

(for buildup simulations, only PyECLOUD, PyKLU and PyPIC are required)

Clone tools from repositories

git clone https://github.com/pycomplete/PyECLOUD
git clone https://github.com/pycomplete/PyPIC
git clone https://github.com/pycomplete/PyKLU
git clone https://github.com/pycomplete/PyHEADTAIL
git clone https://github.com/pycomplete/NAFFlib
git clone https://github.com/pycomplete/PyPARIS
git clone https://github.com/pycomplete/PyPARIS_sim_class
git clone https://github.com/pycomplete/PyPARIS_CoupledBunch_sim_class

Compile

cd PyECLOUD
./setup_pyecloud
cd ..

cd PyPIC
make
cd ..

cd PyKLU
./install
cd ..

cd PyHEADTAIL
make
cd ..

cd NAFFlib/NAFFlib
make
cd ..

Include the packages in your PYTHONPATH

I have cloned the tools in /home/giadarol/Desktop/PyFRIENDS_python3

export FOLDER_WITH_PACKAGES=/home/giadarol/Desktop/PyFRIENDS_python3
export PYTHONPATH=$FOLDER_WITH_PACKAGES:$FOLDER_WITH_PACKAGES/PyHEADTAIL:$FOLDER_WITH_PACKAGES/NAFFlib:$PYTHONPATH

(this step will have to be repeated each time you open a new shell, alternative you can put these commands in your bashrc file)