Changes between Version 60 and Version 61 of Doc/ComputingCenters/TGCC


Ignore:
Timestamp:
11/25/20 15:23:47 (3 years ago)
Author:
edupont
Comment:

Version 0 of new python package installation on IRENE

Legend:

Unmodified
Added
Removed
Modified
  • Doc/ComputingCenters/TGCC

    v60 v61  
    284284 
    285285 
     286# Installing a missing Python package # 
     287 
     288To install a missing python package you may need, you must install it from its sources. In this example we try to install a package we call 'super_package' 
     289As IRENE has no http connexion to the internet, you must download it on you mesocentre account :  
     290On ciclad : 
     291{{{ 
     292> wget <address of the source>.tar.gz 
     293}}} 
     294  
     295Then you must scp it to IRENE, on your WORKDIR. For this, log in to irene and :  
     296{{{ 
     297> scp login@ciclad.address.fr:/path/to/your/archive $CCCWORKDIR/dossier_de_sources/super_package.tar.gz 
     298}}} 
     299From now on everything will be done on IRENE. 
     300Uncompress the archive :  
     301{{{ 
     302> tar -xvzf  $CCCWORKDIR/dossier_de_sources/super_package.tar.gz 
     303}}} 
     304We want to install the package for a usage with python3.7, thus, we load the module and add our source folder to the PYTHONPATH : 
     305{{{ 
     306> module load python3/3.7.5 
     307> export PYTHONPATH="${PYTHONPATH}:$CCCWORKDIR/dossier_de_sources/lib/python3.7/site-packages" 
     308# You may need to do some mkdir to create lib/python3.7/site-packages 
     309}}} 
     310Now we install the package : 
     311{{{ 
     312> cd super_package 
     313> python3 setup.py install --prefix=$CCCWORKDIR/dossier_de_sources 
     314}}} 
     315 
     316 
     317The package is now installed.  
     318 
     319To use it on a next session, we will have to load the module and update the PYTHONPATH : 
     320{{{ 
     321> module load python3/3.7.5 
     322> export PYTHONPATH="${PYTHONPATH}:$CCCWORKDIR/dossier_de_sources/lib/python3.7/site-packages" 
     323}}} 
     324 
     325You can now import this package on your python scripts. 
     326 
    286327# The TGCC's machines #  
    287328