/opt/intel/intelpython35/bin/python3The examples compare the standard CPython that powers Python 3 (3.4 to be precise) against Intel Python 3.5. The command python3.4 runs scripts using the older Python, and python3 runs them using the Intel Python. This small test program, test1.py, shows which Python ran the program, to confirm that the correct Python is running the example: [code language="python"] import sys print (sys.version) [/code] This outputs: [code language="python"] >python3 test1.py 3.5.1 (default, Mar 22 2016, 01:32:51) [GCC Intel(R) C++ gcc 4.8 mode] >python3.4 test1.py 3.4.3 (default, Oct 14 2015, 20:28:29) [GCC 4.8.4] [/code]
Exploring Intel's Distribution for Python
For years, Intel has focused on two programming languages: C++ and Fortran. Now they have released a third language implementation: Python. The release includes a number of packages used in high-performance computing, including NumPy/SciPy. So how does Intel’s distribution compare to standard Python (i.e., CPython)? The beta is available for Windows, Linux, and Mac OS X, and supports Python versions 2.7 and 3.5. It features performance accelerations via Intel MKL, Intel MPI, Intel TBB, and Intel DAAL. On the Mac, you need OS/X 10.11; Windows 7-10 is supported. My own preference is Linux; all of the following examples were run in VirtualBox running Ubuntu 14.04 LTS. (The Linux download is 800 MB, and that includes many relevant open-source packages provided in binary, with no compilation required; note that this software is 64-bit.) Intel Python comes with Conda for managing packages; if you already use “full” Anaconda for running and updating packages and dependencies, you’ll need to follow the (short) instructions for using the Intel Distribution with Anaconda. Once you’ve completed installation, you can use the "which python" for 2.7 or "which python3" commands for 3.5 to show the path to the installation. On Linux, the standard path for CPython is /usr/bin/python. On my Ubuntu 14.04 LTS, I installed Intel Python 3.5; “which python3” shows the following: