Changes between Version 31 and Version 32 of Python3Support
- Timestamp:
- 12/27/18 02:55:20 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Python3Support
v31 v32 656 656 }}} 657 657 658 Preparation 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 use system-side packages:659 660 {{{ 661 # BUILD WX PACKAGE DEPENDECIES658 Preparation 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 662 662 # 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) 663 sudo dnf install python3-six python3-numpy python3-wxpython4 664 # 3a) on Debian/Ubuntu system 665 sudo 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) 667 672 sudo 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 675 Create the virtual environment: 676 677 {{{ 678 # FOR CURRENT USER ONLY 681 679 # 4a) on Fedora 682 680 virtualenv-3 -p python3 grasspy3 683 # 4a) on Ubuntu681 # 4a) on Debian/Ubuntu 684 682 virtualenv -p python3 grasspy3 685 683 686 # OR USE SYSTEM-SIDE PACKAGES INSTEAD684 # OR AS SYSTEM-SIDE VIRTUALENV 687 685 # 4b) on Fedora 688 686 virtualenv-3 -p python3 grasspy3 --system-site-packages 689 # 4b) on Ubuntu687 # 4b) on Debian/Ubuntu 690 688 virtualenv -p python3 grasspy3 --system-site-packages 691 689 }}} … … 698 696 }}} 699 697 700 and build within this environment 'wx' package ( only if system-wide packages are not used)701 {{{ 702 # now, within this environment703 # install required Python3 packages for GRASS GIS (it takes time like 30min and some GB to build! )698 and 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) 704 702 pip install six 705 703 pip install wxpython 706 704 pip install numpy 707 705 708 # if desired, also GDAL 706 # if desired, also GDAL (not recommended) 709 707 pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version` 710 708 }}} 711 709 712 710 We are now settled with the dependencies. 711 712 Compile GRASS GIS with Python3: 713 {{{ 714 # cd where/the/source/is/ 715 configure... 716 make 717 make install 718 }}} 713 719 714 720 Test GRASS GIS with Python3: