Opentrons / buildroot

The Opentrons fork of buildroot for building the OT2 system. Our default branch is opentrons-develop.
http://buildroot.org
Other
10 stars 7 forks source link

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

Closed SyntaxColoring closed 6 months ago

SyntaxColoring commented 6 months ago

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

SyntaxColoring commented 6 months ago

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