Improve the workflow for installing Python modules from the Python package index PyPI.
This is a design task to evaluate options.
- Currently using pip is possible, so it would be good to hear what steps should be made to better support it.
- This task may result in documenting best-practices for using pip inside Blender, without needing significant changes to Blender's bundled Python.
- This post was prompted by https://lists.blender.org/pipermail/bf-committers/2019-November/050297.html
For Python developers to be able to install 3rd party modules into Blender.
While this is possible, it's quite involved:
This task is to evaluate possible solutions:
- Use pip with Blender's built-in Python.
- Only support pip for system-wide Python installations.
- Windows Python MSVC compatibility. (EDIT: this is no longer an issue).
In the past, Blender's Python was built with a different MSVC version, making binary modules incompatible.
- File System Permissions
The Blender's Python directory may not be writable.
This could be solved using the --user argument.
eg: on Linux pip install my_package --user installs to ~/.local/lib/python3.8/site-packages/bintrees
Possible Solution: Set PYTHONUSERBASE to a directory under Blender's own configuration.
This has the advantage that it will work with both a system wide & a bundled Python installation.