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

Pass env pythonpaths to pip #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

hannesdelbeke
Copy link
Contributor

@hannesdelbeke hannesdelbeke commented May 22, 2023

this PR adds the ability to see local installed packages.
e.g. modules in the user addons folder

  1. this relies on Blender taking care of the sys.path setup, avoiding any bugs with trying to recreate this logic ourselves.
  2. we then add every path to PYTHONPATH, which is passed to the subprocess. giving pip access to the custom paths from the Blender session.

also removed some unused imports, and some site code that AFAIK is not used anywhere.

we add some paths to sys.path, but sys.paths won't get passed to subprocess
default included in blender for good reason
C:\\Users\\user\\AppData\\Roaming\\Python\\Python310\\site-packages
points to py packages outside of blender, could cause clashes
now pip list also shows packages installed to e.g. the addons folder
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.

None yet

1 participant