[Bf-python] Adding removed python modules for a test.

Domino Marama domino at dominodesigns.info
Wed Jan 21 01:10:40 CET 2015


On 20/01/15 22:29, Jorge Pareja wrote:
> ----------------------------------------
>> Hi,
>>
>> On Tue, Jan 13, 2015 at 11:01:16PM -0500, Jorge Pareja wrote:
>>> I am interested in adding the removed python modules back in,
>>> atleast localy on my system. My local, default, install of Python
>>> is 2.7.9 and I cant upgrade just yet, it is currently required by
>>> other software I need to use.
>>>
>>> What is the best way to get the full Python 3.4 release with all
>>> default packages, aside from installing it on my system which would
>>> break my 2.7.9 version, into Blender 2.73?
>> You can install different versions of Python next to each other,
>> without breaking anything. You can have Python 2.7 in C:\Python27 and
>> Python 3.4 in C:\Python34. As a matter of fact, the installers already
>> do this, so you have to actively change things to mess up.
>>
>>> So I am assuming I will need to build something from sources which I
>>> have already downloaded both Blender and Python sources. Another
>>> question is... Do I have to use Python 3.4.0 or can I use 3.4.2?
>> You don't have to get the Blender sources in order to just install
>> some Python packages. Just install them as normal for your system,
>> then copy them into Blender's own Python directory.
>>
>> It probably won't matter whether you install 3.4.0 or 3.4.2, but if
>> you want to be 100% sure, pick the one that's used by the version of
>> Blender you're using.
>>
>> --
>> Sybren A. St?vel
> I have tried everything recomended since I first posted, I am still getting
> an error stating:
>
>     ImportError: No module named '_winreg'
>
> When I run:
>
>     blender.exe -P 2.73\python\lib\get_pip.py
>
> to install PIP which don't seem to fix by just copying the lib from Python
> 3.4 to Blender\2.73\python .
>
> This must be in the C code of Python or Blender internals.  I need the
> code back so I can install the packages I need.  Just copying packages is
> not working for me, and others on various blender forums.  Something
> broke between Blender 2.6?? builds when some python packages were
> removed from blender sources to save space, it most likely went
> unreported by the community.
>
> all help is greatly appreciated, a src PATCH I can apply would be brilliant.
> I know patches are made with diff but I have never used diff.  Can someone
> run diff with origional python src and blenders python src to help me sort
> this out?  I realy need the python install systems to function in blender.  Why
> was it removed anyway?
>
> BTW, I am running Win7 32-Bit, and have MinGW w/msys that has patch
> v2.6.1.  I have current blender and python sources.  I have compiled Blender
> successfuly without modifying anything in Visual Studio 2013 Express, so
> Blender compiles fine using 32-bit.
>
> Also, I am not too sure how to properly reply to my thread so this may post
> as a new thread.
>
> While I wait for a reply from this list I will search the sources of both blender
> and python for the "_winreg".  If someone can try to install pip in blender on
> non-Windows systems to see if there is this type of error on other systems
> maybe we can "kill two birds with one stone".   I am following the instructions
> at https://pip.pypa.io/en/latest/installing.html
>
> Thanks again,
> Jorge
>  		 	   		  
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
_winreg was renamed to winreg in python 3.4.0, so it looks like an old
get_pip.py might be to blame.

It'd be better if running:

import ensurepip
ensurepip.bootstrap()

from the python console in Blender worked. It might be worth exploring
that if you are copying extra libs in from full python..

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4267 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20150121/371b233e/attachment.bin>


More information about the Bf-python mailing list