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

Jens Vewrwiebe info at jensverwiebe.de
Fri Feb 12 23:33:04 CET 2016


Install script ?
Simply remove the filter for distutils in the install patterns, python 
is ad hoc
featurecomplete after c being compiled, just blender install does not 
take it over ;)

Jens

Am 12.02.2016 um 22:16 schrieb Xavier Thomas:
> 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
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>

-- 

Jens Verwiebe
Allerskehre 44 - 22309 Hamburg

Tel.: +49 40 67 78 50
mobile: +49 172 400 49 07
mailto: info at jensverwiebe.de
web: http://www.jensverwiebe.de



More information about the Bf-committers mailing list