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

opentrons-ot3-image: Add python3 pip module so users can install python packages. #104

Merged
merged 3 commits into from
Sep 18, 2023

Conversation

vegano1
Copy link
Collaborator

@vegano1 vegano1 commented Sep 16, 2023

Overview

We want users to be able to install custom python packages using pip, so let's add that module and configure it so it uses the /userfs/var/ directory when installing packages.

Changelog

  • Add python3-pip to opentrons-ot3-image recipe
  • Add custom python3-pip action in do_install to install a custom pip.conf and .pth file to set install dir
  • Add /var/user-packages/usr/bin to PATH env variable so we can access installed executables.

Test

  • Make sure pip was installed by running pip3
  • Install a python package not included with the system by running pip3 install gspread
  • Make sure the package is installed to /var/user-packages/usr/lib/python3.8/site-packages/
  • Make sure we can import this package from the Python interpreter
  • Make sure we can import this package from a Jupyter Notebook journal

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ice, looks good to me!

@vegano1 vegano1 merged commit 315ef11 into main Sep 18, 2023
3 checks passed
@vegano1 vegano1 deleted the add-pip-module branch September 18, 2023 13:34
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

Successfully merging this pull request may close these issues.

2 participants