Changes between Version 23 and Version 24 of Python3Support
- Timestamp:
- 09/13/18 05:07:12 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Python3Support
v23 v24 643 643 644 644 === Linux === 645 645 646 We 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. 646 647 … … 649 650 # 1) generic, using pip (WHICH SYSTEM?) 650 651 pip 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 653 sudo apt install python3-virtualenv 654 }}} 655 656 Preparation 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 661 sudo 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) 664 sudo apt install libgtk-3-dev libgstreamer-plugins-base0.10-dev 665 666 # OR USE SYSTEM-SIDE PACKAGES INSTEAD 667 668 # 3b) on Fedora 669 sudo dnf python3-six python3-wx python3-numpy 670 # 3b) on Debian/Ubuntu system 671 sudo apt install python3-six python3-wx python3-numpy 672 }}} 673 674 Create virtual environment: 675 676 {{{ 677 # BUILD WX PACKAGE DEPENDECIES 678 # 4a) on Fedora 679 virtualenv-3 -p python3 grasspy3 680 # 4a) on Ubuntu 664 681 virtualenv -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 685 virtualenv-3 -p python3 grasspy3 --system-site-packages 686 # 4b) on Ubuntu 687 virtualenv -p python3 grasspy3 --system-site-packages 667 688 }}} 668 689 669 690 Activating the virtual Python3 environment for testing: 691 670 692 {{{ 671 693 # activate it (this will change the terminal prompt so that you know where you are...) 672 694 source grasspy3/bin/activate 673 695 }}} 696 697 and build within this environment 'wx' package (only if system-wide packages are not used) 698 {{{ 674 699 # now, within this environment 675 700 # install required Python3 packages for GRASS GIS (it takes time like 30min and some GB to build!) 701 pip install six 676 702 pip install wxpython 677 703 pip install numpy … … 683 709 {{{ 684 710 # just run it in the virtualenv-3 session 685 grass7 6--gui711 grass77 --gui 686 712 }}} 687 713