fr:develop:collaboration:dev:environnement_python

Differences

This shows you the differences between two versions of the page.

fr:develop:collaboration:dev:environnement_python [2021/03/11 21:55] – créée qroyerfr:develop:collaboration:dev:environnement_python [2023/09/06 11:12] () qroyer
 1:  1:
 ====== Création d'un environnement Python ====== ====== Création d'un environnement Python ======
- 
-Si besoin, vous trouverez ci-dessous, les étapes pour faciliter la création de l'environnement virtuel Python d'HABBY. 
- 
-===== Windows ===== 
  
 ==== Dépendances ==== ==== Dépendances ====
 +
 +Le projet Python HABBY est hébergé sur Github accessible au lien suivant : https://github.com/YannIrstea/habby. 
  
   * Python >= 3   * Python >= 3
   * Git   * Git
-  * Microsoft Visual C++ 14.0 : https://visualstudio.microsoft.com/fr/visual-cpp-build-tools/ 
-  * GDAL : https://www.gisinternals.com/release.php 
  
-==== Étape par étape ====+==== Aide à la création de l'environnement Python pour Windows ====
  
-  * Avoir cloné le projet git https://github.com/YannIrstea/habby +  * Installer les dépendances. 
-  * Télécharger les dépendances décrites ci-dessus.+  * Télécharger la wheele GDAL : https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal  
 +    * https://www.gisinternals.com/release.php 
 +  * Installer Microsoft Visual C++ 14.0 : https://visualstudio.microsoft.com/fr/visual-cpp-build-tools/
   * Ouvrez le fichier 'creation_env_habby.bat' et spécifiez :   * Ouvrez le fichier 'creation_env_habby.bat' et spécifiez :
     * le chemin d'accès à votre Python système en remplaçant le chemin de la variable : 'python_source_path=' ;     * le chemin d'accès à votre Python système en remplaçant le chemin de la variable : 'python_source_path=' ;
 24:  22:
   * Votre environnement virtuel Python pour HABBY est prêt.   * Votre environnement virtuel Python pour HABBY est prêt.
  
-===== Linux ===== 
  
-===== Mac =====+ 
 +==== Aide à la création de l'environnement Python pour Linux ==== 
 + 
 +  * installation de GDAL for Linux and GDAL for Python (https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html) 
 + 
 +  sudo apt-get install python3.6-dev 
 +  sudo add-apt-repository ppa:ubuntugis/ppa 
 +  sudo apt-get update 
 +  sudo apt-get install gdal-bin 
 +  ogrinfo --version 
 +  sudo apt-get install libgdal-dev 
 + 
 +  * Lancer le fichier 'tips\virtual_envs\creation_env_habby_pip.sh'
 + 
 +  pip3 install pip --upgrade 
 +  pip3 install virtualenv 
 +  cd ../habby_dev 
 +  virtualenv --python /usr/bin/python3.6 env_virtuels/env_habby_dev_pip 
 +  source env_virtuels/env_habby_dev_pip/bin/activate 
 +  pip3 install gdal==X.X.X --global-option=build_ext --global-option="-I/usr/include/gdal/" 
 +  pip3 install -r habby/requirements.txt 
 +  python habby/habby.py 
 + 
 +{{indexmenu_n>1}}
  
  
  • fr/develop/collaboration/dev/environnement_python.1615496137.txt.gz
  • 2021/03/11 21:55
  • qroyer