Data360 Analyze

 View Only
  • 1.  How to add openpyxl function to python?

    Posted 02-02-2022 06:37

    How to add openpyxl function to python? We are on Data360 version 368 on Linux machine.



  • 2.  RE: How to add openpyxl function to python?

    Employee
    Posted 02-02-2022 07:41

    Please refer to this KB article:

    https://support.infogix.com/hc/en-us/articles/360051959533-How-to-install-3rd-party-Python-packages-on-Analyze

    You do not state whether you are intending using the package with the Python node or the Jython-based nodes (e.g. the Transform and Generate Data nodes) - there are differences in how a Python package is installed depending on it's usage and there are some restrictions on using packages due to the programming language used to create the package.

    Also note the documentation for the openpyxl package indicates the current version is only compatible with Python 3.6. The last version that was compatible with Python 2.7 is v.2.6.4.

    https://pypi.org/project/openpyxl/2.6.4/

     

     



  • 3.  RE: How to add openpyxl function to python?

    Posted 02-03-2022 05:08

    I downloaded openpyxl-2.6.4.tar.gz file. What are the steps to import this file?



  • 4.  RE: How to add openpyxl function to python?

    Employee
    Posted 02-03-2022 06:58

    Identify the location of Analyze's  'site' directory (usually named "site-7731").

    Assuming you have transferred the downloaded package to the machine hosting Analyze:

    Navigate to the directory containing Analyze's embedded Python instance.

    For a Linux Server instance:

    cd <Analyze_Install_Dir>/platform/linux-x86-64/python

    For a Windows Server instance:

    cd <Analyze_Install_Dir>/platform/windows-x86-64/python

     

    If the package is for use with the Python node, run the following command (replacing <site> with the path previously identified for the Analyze 'site' directory and <repository> with the directory containing the Python package).

    python -m pip install openpyxl --target "<site>/lib/python2" --no-index --find-links "<repository>"

     

    If the package is for use with the Jython-based nodes (Transform, Generate Data, etc), run the following command (replacing <site> with the path previously identified for the Analyze 'site' directory and <repository> with the directory containing the Python package).


    python -m pip install openpyxl --target "<site>/lib/jython2" --no-index --find-links "<repository>"