This release of Python is, in fact, quite large. The size of download itself (a compressed tar file) is 485,749,868 bytes (call it half a gigabyte…) and the uncompressed, restored file tree’s size is 2,458,780K (call it 2.5GB). Here’s the output of my uncompress/restore:
bash-2.03$ time gzip -d -c python-2017-04-12-py27.tar.gz | tar xoUXf -
real 2m30.392s
user 0m24.329s
sys 0m8.110s
bash-2.03$ du -sk python-2017-04-12-py27
2458780 python-2017-04-12-py27
bash-2.03$
The installation instructions are (somewhat unfortunately) contained in a README file in the restored file tree. I’m including them here for completeness.
This is a release of Python 2.7.13 and Python 3.6.1 for z/OS. There are separate downloads for python 2 and 3, but they were both built in the same process, with the same sources.
This release of Python contain the packages required for NumPy, SciPy, Pandas, and Jupyter, as well as some add-ons for Jupyter, and several other packages as well.
The conda packages are not currently usable.
JupyterHub is not available for Python 2.7.
StatsModels has not yet been built for Python 3.6.1.
All other Python packages is this release are built for both 2.7.13 and 3.6.1.
- This release was built on a z/OS 2.2 system.
- Everything is built 64 bit and in ASCII mode.
- This distribution was created on “2017-04-12-12-30”.
Note! If you did not use xoUXf options in your tar command then installation will fail and you must start over.
Note! Environment variable _BPXK_AUTOCVT
must be set to ON
Note! If you use tcsh, the export commands below must be edited by replacing every “export” with “setenv”, and replacing every “=” with " ", in your file ~/.tcshrc.
DOWNLOAD AND UNPACK INSTRUCTIONS
Choose whether you want to install only Python 2.7.13, only Python 3.6.1, or both. Extra space savings arise if you download the combined release, and your users will be able to choose whether to use an environment that contains python2, python3, or both. The extra savings results because the install procedure uses hard links between files when possible.
After being unpacked, this release will occupy about 2.4 GB, if you chose either Python 2 or Python 3, or 3.6 GB if you chose both.
Create a directory for the install, and cd into it.
Unpack using “gzip -d -c downloadfile.tar.gz | tar xoUXf -”.
PREREQUISITES
Before proceeding with installation instructions below you should install and set up the following:
- bash 4.3 - Used by the utilities for the gzip and xz packages.
- perl 5.24 - Used by two openssl scripts.
INSTALLATION INSTRUCTIONS
The following lines must be edited and executed. You can either execute them in order from the command line or paste them into a script and execute the script.
export BASH_PREFIX=<the_directory_containing_bin_bash>
export PERL_PREFIX=<the_directory_containing_bin_perl>
INSTALL=<your_install_directory>
export RELEASE_NAME=python-2017-04-12
export RELEASE_TYPE=py27 # or py36 or both, to match the download you chose
export RELEASE_DIR=$INSTALL/${RELEASE_NAME}-${RELEASE_TYPE}
export PKGS_BASE=$RELEASE_DIR/pkgs
cd $RELEASE_DIR; ls -ld python27 python36 both
# based on the results of the ls, run one or more of these commands
cd $RELEASE_DIR/python27; bin/install_all_packages
cd $RELEASE_DIR/python36; bin/install_all_packages
cd $RELEASE_DIR/both; bin/install_all_packages
USAGE
Every user of this distribution should put the following lines at the end of your shell init file:
If you use sh, put these lines at the end of your ~/.profile:
If you use bash, put these lines at the end of your ~/.bashrc:
export _BPXK_AUTOCVT=ON
INSTALL=<your_install_directory>
export RELEASE_NAME=python-2017-04-12
export RELEASE_TYPE=py27 # or py36 or both, to match the download
export RELEASE_DIR=$INSTALL/${RELEASE_NAME}-${RELEASE_TYPE}
export PYTHON_ENV=python27 # pr python36 or both, to match your desired environment
export PYTHON_HOME=$RELEASE_DIR/$PYTHON_ENV
export PATH=$PYTHON_HOME/bin:$PATH
export LIBPATH=$PYTHON_HOME/lib:$LIBPATH
export FFI_LIB=$PYTHON_HOME/lib/ffi
export TERMINFO=$PYTHON_HOME/share/terminfo
export PKG_CONFIG_PATH=$PYTHON_HOME/lib/pkgconfig:$PYTHON_HOME/share/pkgconfig
export CURL_CA_BUNDLE=$PYTHON_HOME/etc/ssl/cacert.pem
If you use sh, re-run your init file with:
. ~/.profile
If you use bash, re-run your init file with:
. ~/.bashrc
Note: There is a problem with this TERMINFO if you use /bin/vi. You will need to choose one of these approaches:
- Comment out the line above that sets TERMINFO, and start python with: env TERMINFO=$PYTHON_HOME/share/terminfo python
- Keep the line above that sets TERMINFO, start vi with: env TERMINFO= vi
Note: There is code in Python (and elsewhere) that uses /dev/urandom. This code will not work unless the ICSF service is started. If it has not been started, you will get results similar to this:
head -c40 /dev/urandom
head: /dev/urandom: EDC5157I An internal error has occurred.