[Bf-committers] Proposal: include Python's distutils

Xavier Thomas xavier.thomas.1980 at gmail.com
Fri Feb 12 22:16:24 CET 2016


Hi,

+1 for this on my side. It would simplify greatly distributing some of the
add-on I make to my clients by including a small install script.

Here falling back to system python works even with minor version number
mismatch.  Maybe you suffer from a 32/64bit mismatch problem, you
absolutely need to use the one Blender was compiled for.

Regards,

Xavier

2016-02-11 3:32 GMT-02:00 Alex Fraser <alex at vpac-innovations.com.au>:

> Hi all,
>
> Recently I wanted to install some packages with pip to use with Blender's
> Python. I thought I should be able to do it like this:
>
>      PYTHON=blender-2.76b-linux-glibc211-x86_64/2.76/python/bin/python3.4
>      wget https://bootstrap.pypa.io/get-pip.py
>      ${PYTHON} get-pip.py
>      ${PYTHON} -m pip install -r requirements.txt
>
> But get-pip.py fails with "ImportError: No module named 'distutils'" [1].
> The suggested alternative is to remove Blender's Python so it falls back to
> the system install [2]. But this doesn't work for me: it causes Blender to
> stop working at all, crashing with "ImportError: No module named
> 'encodings'" [3]. I think this indicates a version incompatibility (3.4.2
> vs 3.4.3).
>
> Campbell says the inclusion of the Python executable is fairly recent.
> Given that Python itself is now included, I think it makes sense to include
> distutils. A quick test on my system suggests it would add about 160k to
> the size of package.
>
> Cheers,
> Alex
>
> --
> Alex Fraser
> Software Engineer
> VPAC Innovations Pty. Ltd.
>
> [1]: http://www.pasteall.org/64483/python
> [2]:
>
> https://www.blender.org/api/blender_python_api_2_61_0/info_tips_and_tricks.html#bundled-python-extensions
> [3]: http://www.pasteall.org/64484
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list