Discussion:
[Bf-python] Adding removed python modules for a test.
Jorge Pareja
2015-01-14 04:01:16 UTC
Permalink
Hi,

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?

My attempts to do it the easy way with "get_pip.py" and "ez_setup.py", for pip and pkgutils respectivly, have failed using:

C:\Programming\blender-2.73-windows32\Blender -P 2.73\python\lib\get_pip.py
due to... ( ImportError: No module named '_winreg' )

and

C:\Programming\blender-2.73-windows32\2.73\Blender -P 2.73\python\lib\ez_setup.py

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?

Oh, I am on a Windows system incase that helps with any respnse.

Any help will be greatly appreciated, thank you in advance.
Jorge
Sybren A. Stüvel
2015-01-14 08:29:49 UTC
Permalink
Hi,
Post by Jorge Pareja
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.
Post by Jorge Pareja
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

http://stuvelfoto.nl/
http://stuvel.eu/
Campbell Barton
2015-01-15 01:32:13 UTC
Permalink
Post by Sybren A. Stüvel
Hi,
Post by Jorge Pareja
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.
Post by Jorge Pareja
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?
Python remains binary compatible between minor point releases (so any
module compiled for 3.4.x is ok).

A problem with ms-windows spesifically, is we have a build of Python
made with MSVC2013, and Python.org still use MSVC2008.

Im not sure of the details since I don't use ms-windows, but I've read
on our bug tracker that this means Blender can't be used with the
systems Python (typically installed on C:\Python3.4) - something that
used to work.
It also means setting the PYTHONPATH to an existing Python3.4x install
will crash Blender.

Hopefully Python.org will update their MSVC at some point to resolve the issue.
Post by Sybren A. Stüvel
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
http://stuvelfoto.nl/
http://stuvel.eu/
_______________________________________________
Bf-python mailing list
http://lists.blender.org/mailman/listinfo/bf-python
--
- Campbell
Christopher Barry
2015-01-15 01:44:04 UTC
Permalink
On Thu, 15 Jan 2015 12:32:13 +1100
Post by Campbell Barton
Post by Sybren A. Stüvel
Hi,
Post by Jorge Pareja
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.
Post by Jorge Pareja
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?
Python remains binary compatible between minor point releases (so any
module compiled for 3.4.x is ok).
A problem with ms-windows spesifically, is we have a build of Python
made with MSVC2013, and Python.org still use MSVC2008.
Im not sure of the details since I don't use ms-windows, but I've read
on our bug tracker that this means Blender can't be used with the
systems Python (typically installed on C:\Python3.4) - something that
used to work.
It also means setting the PYTHONPATH to an existing Python3.4x install
will crash Blender.
Hopefully Python.org will update their MSVC at some point to resolve the issue.
Could this get around that?
http://www.activestate.com/activepython

-C

<snip...>
Mark Young
2015-01-15 13:49:41 UTC
Permalink
For reference, the plan for 3.5 is to use VS2015:
http://bugs.python.org/issue22919 .
http://code.activestate.com/lists/python-dev/134049/ VS2010 and later will
still be supported, but the python.org binaries will probably use 2015. (As
far as I know, this could still change, e.g. if VS2015 misses its scheduled
release date, but it's currently the plan)
Campbell Barton
2015-01-18 23:48:16 UTC
Permalink
On Thu, Jan 15, 2015 at 12:44 PM, Christopher Barry
Post by Christopher Barry
On Thu, 15 Jan 2015 12:32:13 +1100
Post by Campbell Barton
Post by Sybren A. Stüvel
Hi,
Post by Jorge Pareja
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.
Post by Jorge Pareja
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?
Python remains binary compatible between minor point releases (so any
module compiled for 3.4.x is ok).
A problem with ms-windows spesifically, is we have a build of Python
made with MSVC2013, and Python.org still use MSVC2008.
Im not sure of the details since I don't use ms-windows, but I've read
on our bug tracker that this means Blender can't be used with the
systems Python (typically installed on C:\Python3.4) - something that
used to work.
It also means setting the PYTHONPATH to an existing Python3.4x install
will crash Blender.
Hopefully Python.org will update their MSVC at some point to resolve the issue.
Could this get around that?
http://www.activestate.com/activepython
-C
Skimmed over & they don't mention using a different MSVC compiler
version, so I'd guess not.
Jorge Pareja
2015-01-20 22:29:19 UTC
Permalink
----------------------------------------
Post by Sybren A. Stüvel
Hi,
Post by Jorge Pareja
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.
Post by Jorge Pareja
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
Domino Marama
2015-01-21 00:10:40 UTC
Permalink
Post by Jorge Pareja
----------------------------------------
Post by Sybren A. Stüvel
Hi,
Post by Jorge Pareja
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.
Post by Jorge Pareja
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
ImportError: No module named '_winreg'
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
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..

Loading...