-
Notifications
You must be signed in to change notification settings - Fork 13
How to install PyECLOUD
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)
If you are using Python 3.12+, distutils is deprecated. To compile the FORTRAN code, you will also need:
- meson
- setuptools
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:
- It is recommended to install Miniforge, install compilers through conda, and use pip to install the required packages.
- A simple guide on how to install miniforge is available here
- It is possible to compile and install your python and all required packages following the instruction here:
- (This "should be" deprecated) Some information for Mac users is available here
(for buildup simulations, only PyECLOUD, PyKLU and PyPIC are required)
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
cd PyECLOUD
./setup_pyecloud
cd ..
cd PyPIC
make
cd ..
cd PyKLU
./install
cd ..
cd PyHEADTAIL
make
cd ..
cd NAFFlib/NAFFlib
make py3
cd ..
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)
This can be done by creating a file local-packages.pth inside your conda environment in the folder:
{/PATH/TO/CONDA/ENV}/lib/python{PYTHON.VERSION}/site-packages/local-packages.pth
which contains the following lines:
/PATH/TO/SCRIPTS
/PATH/TO/SCRIPTS/PyHEADTAIL
/PATH/TO/SCRIPTS/NAFFlib
This will enable you to seamlessly import all the PyCOMPLETE packages inside your conda environment.