Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPython Script Executor not recognizing globally installed libraries on Ubuntu #36

Open
AlefRP opened this issue May 8, 2023 · 1 comment

Comments

@AlefRP
Copy link

AlefRP commented May 8, 2023

Environment:

  • Pentaho Data Integration version: 9.2
  • Operating System: Ubuntu
  • Python version: 3.10
  • Libraries: pandas, scikit-learn, matplotlib

Issue:

I am using Pentaho Data Integration (PDI) version 9.2 on Ubuntu and trying to execute a CPython Script using the CPython Script Executor step. However, I am encountering an issue where the logs indicate that some libraries, such as pandas, scikit-learn, and matplotlib, are not installed. I have installed these libraries in the global Python environment on Ubuntu without using a virtual environment, as I couldn't find a way to configure the plugin to use a virtual environment.

The same setup works fine on Windows, but I am struggling to get it to work on Ubuntu.

Steps to reproduce:

  1. Install Pentaho Data Integration 9.2 on Ubuntu
  2. Install pandas, scikit-learn, and matplotlib in the global Python environment on Ubuntu
  3. Create a transformation with the CPython Script Executor step
  4. Configure the CPython Script Executor step to use a script that imports pandas, scikit-learn, and matplotlib
  5. Run the transformation

Expected behavior:

The CPython Script Executor step should be able to recognize the installed libraries in the global Python environment on Ubuntu and execute the script without issues.

Actual behavior:

The logs indicate that the required libraries (pandas, scikit-learn, and matplotlib) are not installed, even though they are installed in the global Python environment on Ubuntu.

Additional information:

I couldn't find any configuration options in the plugin to specify the Python environment or virtual environment. This issue does not occur when using the same setup on Windows.

Any help or guidance to resolve this issue would be appreciated.

@grayver
Copy link

grayver commented May 23, 2024

I had the same issue, but then realized that I have 2 python versions installed (3.8 and 3.9). When I run pip install pandas globally - it installs the package for python3.9. But when I run python from the shell, it executes python3.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants