How to add openpyxl function to python?
How to add openpyxl function to python? We are on Data360 version 368 on Linux machine.
-
Please refer to this KB article:
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/
-
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>"
Please sign in to leave a comment.
Comments
3 comments