Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After testing, it may be discovered that certain applications may not run with Python 2.7.13 64-bit due to unresolved/conflicting dependencies (e.g., 32-bit Python modules, Matlab2016b, Qt5Qt, etc.) or other reasons. If such dependencies cannot currently be resolved, Python developers may invoke the following environment settings in a wrapper script or similar to launch the application using the older instance of Python instead:

Info
titleNotes

The following instructions assume that you are using the Bash shell, and that ${LCLS_ROOT}=/usr/local/lcls.

The steps below will set your default Python instance to Python 2.7.4 32-bit. Any Python applications that have 64-bit dependencies will no longer work with this environment setup.

  1. Add the previous Python instance (Python 2.7.4 32-bit) to your environment: 

    Code Block
    languagebash
    themeConfluence
    export PYTHON_ROOT=${LCLS_ROOT}/package/python/python2.7.4
  2. Add the previous Python binaries to your environment:

    Code Block
    languagebash
    themeConfluence
    export PATH=${PYTHON_ROOT}/bin:${PATH} 
  3. Add the old 32-bit Python libraries and their dependencies to your environment:

    Code Block
    languagebash
    themeConfluence
    export LD_LIBRARY_PATH=${PYTHON_ROOT}/lib:${LD_LIBRARY_PATH}
    export LD_LIBRARY_PATH=${PYTHON_ROOT}/lib/python2.7/lib-dynload:${LD_LIBRARY_PATH}
  4. [Optional]  If your application(s) import the 32-bit "cx_Oracle" module, add /change the following in to your environment:

    Code Block
    languagebash
    themeConfluence
    export ORACLE_HOME=${LCLS_ROOT}/package/oracle/product/11.1.0.6/client
    export PATH=${ORACLE_HOME}/bin:${PATH}
    export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}
  5. [Optional]

    $QT_HOME

    If your application(s) import "PyQt4", "PyQt5", "PyQwt", or any other 32-bit Qt dependencies, add the following to your environment:

    Code Block
    languagebash
    themeConfluence
    export QT_HOME=${LCLS_ROOT}/package/Qt-4.8.5
    export PATH=${QT_HOME}/bin:${PATH}
    export LD_LIBRARY_PATH=${QT_HOME}/lib:${LD_LIBRARY_PATH}
  6. [Optional] If your application(s) import "matlab_wrapper" or any other 32-bit Matlab 2012a dependent modules, add the following to your environment:

    Code Block
    languagebash
    themeConfluence
    export LD_LIBRARY_PATH=${LCLS_ROOT}/matlab/2012a/extern/lib:${LD_LIBRARY_PATH}
    [Optional] Matlab