Changes between Version 31 and Version 32 of Python3Support


Ignore:
Timestamp:
Dec 27, 2018, 2:55:20 AM (5 years ago)
Author:
neteler
Comment:

minor cleanup

Legend:

Unmodified
Added
Removed
Modified
  • Python3Support

    v31 v32  
    656656}}}
    657657
    658 Preparation of the virtual Python3 environment. There are two options, build wx package on your own (it takes time like 30min and some GB to build!) or use system-side packages:
    659 
    660 {{{
    661 # BUILD WX PACKAGE DEPENDECIES
     658Preparation of the virtual Python3 environment. There are two options, build wx package on your own (it takes time like 30+min and some GB to build!) or simply use system-wide packages:
     659
     660{{{
     661# USE DISTRO PROVIDED PACKAGES
    662662# 3a) on Fedora
    663 # OLD: sudo dnf install python3-six gtk3-devel gstreamer-devel gstreamer-plugins-base-devel python3-sip python3-sip-devel webkit2gtk3-devel
    664 ### --> see 3b) below for an easier way
    665 
    666 # 3a) on Debian (untested)
     663sudo dnf install python3-six python3-numpy python3-wxpython4
     664# 3a) on Debian/Ubuntu system
     665sudo apt install python3-six python3-numpy python3-wx
     666
     667# OR BUILD WX PACKAGE DEPENDENCIES
     668# 3b) on Fedora (not recommended)
     669# sudo dnf install python3-six gtk3-devel gstreamer-devel gstreamer-plugins-base-devel python3-sip python3-sip-devel webkit2gtk3-devel
     670
     671# 3b) on Debian/Ubuntu (untested)
    667672sudo apt install libgtk-3-dev libgstreamer-plugins-base0.10-dev
    668 
    669 # OR USE SYSTEM-SIDE PACKAGES INSTEAD
    670 
    671 # 3b) on Fedora
    672 sudo dnf install python3-six python3-numpy python3-wxpython4
    673 # 3b) on Debian/Ubuntu system
    674 sudo apt install python3-six python3-wx python3-numpy
    675 }}}
    676 
    677 Create virtual environment:
    678 
    679 {{{
    680 # BUILD WX PACKAGE DEPENDECIES
     673}}}
     674
     675Create the virtual environment:
     676
     677{{{
     678# FOR CURRENT USER ONLY
    681679# 4a) on Fedora
    682680virtualenv-3 -p python3 grasspy3
    683 # 4a) on Ubuntu
     681# 4a) on Debian/Ubuntu
    684682virtualenv -p python3 grasspy3
    685683
    686 # OR USE SYSTEM-SIDE PACKAGES INSTEAD
     684# OR AS SYSTEM-SIDE VIRTUALENV
    687685# 4b) on Fedora
    688686virtualenv-3 -p python3 grasspy3 --system-site-packages
    689 # 4b) on Ubuntu
     687# 4b) on Debian/Ubuntu
    690688virtualenv -p python3 grasspy3 --system-site-packages
    691689}}}
     
    698696}}}
    699697
    700 and build within this environment 'wx' package (only if system-wide packages are not used)
    701 {{{
    702 # now, within this environment
    703 # install required Python3 packages for GRASS GIS (it takes time like 30min and some GB to build!)
     698and build within this environment 'wx' package (NOTE: only needed if 3b) above was used!)
     699{{{
     700# run within virtualenv
     701# install required Python3 packages for GRASS GIS (it takes time like 30min and some GB to build! not recommended)
    704702pip install six
    705703pip install wxpython
    706704pip install numpy
    707705
    708 # if desired, also GDAL
     706# if desired, also GDAL (not recommended)
    709707pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
    710708}}}
    711709
    712710We are now settled with the dependencies.
     711
     712Compile GRASS GIS with Python3:
     713{{{
     714# cd where/the/source/is/
     715configure...
     716make
     717make install
     718}}}
    713719
    714720Test GRASS GIS with Python3: