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

bug: installing packages from PyPi is broken upon upgrading from v7.1.0 to v7.2.2 #15110

Open
ahmadomira opened this issue May 7, 2024 · 0 comments
Labels

Comments

@ahmadomira
Copy link

Overview

After updating our OT-2 robot's software from v7.1.0 to v7.2.2, installing a Python package (from outside Python's standard library) using pip doesn't work. The installed packages do exist in Python's site-packages directory, yet importing them inside the Python interpreter results a Module Not Found error.

Please note that this problem goes away when downgrading the software to v7.1.0.

Steps to reproduce

Note: the following problem can be reproduced by installing any PyPi package. The packages are installed following this Opentrons tutorial.

After completing the initial SSH-setup:

  1. connect the robot to our local network
  2. open a Powershell window, and do:
ssh -i ot2_ssh_key root@OUR_ROBOT_ID
  1. after successful login to the robot:
pip3 install openpyxl
  1. after a successful package installation, restart the robot.
  2. login again into the robot over SSH (repeat Step 1)
  3. doing, for example:
python3
>>> import openpyxl

Current behavior

Doing, for example, this:

python3
>>> import openpyxl

outputs: Module Not Found Error

or simply attempting to uninstall the same package, with no further steps in between (as shown in the screenshot below):

pip3 uninstall openpyxl

outputs: WARNING: Skipping openpyxl as it is not installed.

We have tried to install packages from PyPi into Python virtual environemts (venv), but the problem persists.

Problem Screenshot

image

The installed packages do exist in Python's system directory

Navigating to Python's site-packages directory, after package installation, shows that the packages exist within the Python directory. Doing in the robots terminal, for example:

which python3

outputs: /usr/bin/python3

Now navigating to /usr/bin/python3/.../site-packages shows that the installed package (and its submodules) exists, as shown in these screenshots:

image
image
image

Expected behavior

Before upgrading the software, which we had to do because of other problem, we used to install our Python packages from within our Jupyter notebooks by doing:

!pip install openpyxl

then import openpyxl in next cells with no issues. Now, doing the same results Module Not Found errors

Operating system

Windows

System and robot setup or anything else?

  • Opentrons software version: v7.2.2
  • The robot is connected to the PC via Ethernet
  • Note: the PYTHONPATH environment variable seems to be empty. We were not able to set it otherwise
@ahmadomira ahmadomira added the bug label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant