Changes between Version 23 and Version 24 of Python3Support


Ignore:
Timestamp:
09/13/18 05:07:12 (6 years ago)
Author:
martinl
Comment:

system-side packages

Legend:

Unmodified
Added
Removed
Modified
  • Python3Support

    v23 v24  
    643643
    644644=== Linux ===
     645
    645646We can rather easily create an isolated environment with Python3 using virtualenv which lets you test GRASS GIS with Python3 support while not cluttering your standard system.
    646647
     
    649650# 1) generic, using pip (WHICH SYSTEM?)
    650651pip install virtualenv
    651 
    652 # 2) on Fedora
    653 sudo dnf install python3-virtualenv python3-six gtk3-devel gstreamer-devel gstreamer-plugins-base-devel python3-sip python3-sip-devel webkit2gtk3-devel
    654 
    655 # 3) on Debian (untested)
    656 apt-get install -y libgtk-3-dev libgstreamer-plugins-base0.10-dev
    657 }}}
    658 
    659 Preparation of the virtual Python3 environment:
    660 {{{
    661 # create environment
    662 
    663 # 1) on Ubuntu
     652# 2) on Debian/Ubuntu
     653sudo apt install python3-virtualenv
     654}}}
     655
     656Preparation of the virtual Python3 environment. There two options, build wx package on your own (it takes time like 30min and some GB to build!) or use system-based packages:
     657
     658{{{
     659# BUILD WX PACKAGE DEPENDECIES
     660# 3a) on Fedora
     661sudo dnf install python3-six gtk3-devel gstreamer-devel gstreamer-plugins-base-devel python3-sip python3-sip-devel webkit2gtk3-devel
     662
     663# 3a) on Debian (untested)
     664sudo apt install libgtk-3-dev libgstreamer-plugins-base0.10-dev
     665
     666# OR USE SYSTEM-SIDE PACKAGES INSTEAD
     667
     668# 3b) on Fedora
     669sudo dnf python3-six python3-wx python3-numpy
     670# 3b) on Debian/Ubuntu system
     671sudo apt install python3-six python3-wx python3-numpy
     672}}}
     673
     674Create virtual environment:
     675
     676{{{
     677# BUILD WX PACKAGE DEPENDECIES
     678# 4a) on Fedora
     679virtualenv-3 -p python3 grasspy3
     680# 4a) on Ubuntu
    664681virtualenv -p python3 grasspy3
    665 # 2) on Fedora
    666 virtualenv-3 -p python3 grasspy3
     682
     683# OR USE SYSTEM-SIDE PACKAGES INSTEAD
     684# 4b) on Fedora
     685virtualenv-3 -p python3 grasspy3 --system-site-packages
     686# 4b) on Ubuntu
     687virtualenv -p python3 grasspy3 --system-site-packages
    667688}}}
    668689
    669690Activating the virtual Python3 environment for testing:
     691
    670692{{{
    671693# activate it (this will change the terminal prompt so that you know where you are...)
    672694source grasspy3/bin/activate
    673 
     695}}}
     696
     697and build within this environment 'wx' package (only if system-wide packages are not used)
     698{{{
    674699# now, within this environment
    675700# install required Python3 packages for GRASS GIS (it takes time like 30min and some GB to build!)
     701pip install six
    676702pip install wxpython
    677703pip install numpy
     
    683709{{{
    684710# just run it in the virtualenv-3 session
    685 grass76 --gui
     711grass77 --gui
    686712}}}
    687713