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

board/opentrons/ot2: Reconfigure Python to find packages in /var/user-packages #231

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Apr 10, 2024

This fixes EXEC-390.

When a user SSHes in and does pip install foo, our pip.conf tells pip to install the package in /var/user-packages/usr/lib/python3.10/site-packages.

The other half of that is that Python needs to be configured separately to look for packages there. We've historically done that with a magic .pth file. But we dropped that file in the Python 3.7 -> Python 3.10 migration, since it didn't look like it was doing anything.

This restores the load-bearing .pth file. Other than updating it for Python 3.10, it works the same way it did before.

Test plan

  • Push a build to an OT-2 and follow the steps to reproduce in EXEC-390.

@SyntaxColoring SyntaxColoring added fix This PR fixes a bug system This issue or PR involves the linux system base labels Apr 10, 2024
@SyntaxColoring
Copy link
Contributor Author

Retested with the latest commit. It's working now. Thanks @DerekMaggio for catching the bug in the original commit.

@SyntaxColoring SyntaxColoring merged commit 4d580d8 into opentrons-develop Apr 15, 2024
3 checks passed
@SyntaxColoring SyntaxColoring deleted the py310_user_packages branch April 15, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix This PR fixes a bug system This issue or PR involves the linux system base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants