no python install needed for 2.37a!!!

Finally, something works!!
http://www.ai.fh-erfurt.de/mitarbeiter-innen/professorinnen/dr-paul-grimm/gdv/ar-blender/ AR Blender. Google it if the link is too long.
As I am testing scripts I cringed at the idea of setting python path, using old blender, something I thought I had done away with, and how would it affect the other python and blender installs?

Bring on AR Blender, been sitting idle on my comp for a long time.
Opened it up and to my surprise Using Python version 2.3 appeared!
Clever people have the full python 2.3 installed with AR Blender.

There must be a .dll or a script included that makes blender find Python in it’s own directories.

So I installed a fresh Blender 2.37a then proceeded to copy the extra files from AR Blender (not the executable) to my new install.
Yes it worked. Using Python version 2.3, standard Blender 2.37a.
Python 2.3 isn’t installed on my comp. Sure is recognized in Blender!

How this has been acheived should really be looked at by someone.
It appears this has been done with Blender 2.41 and Python 2.4 also.

I should note that AR Blender is pretty cool by itself too!

Blender with a full Python install from a flash stick anyone!
42.6meg is a small price to pay.

Actually, python 2.3 is installed . . . with AR Blender. All a python install really does is copy the python files to a (single) directory, and then sets an environment variable so that other programs know which directory it is in. AR Blender comes with that directory, and then when you click on the .bat file to load AR Blender, it sets the environment variable to point to the directory before calling Blender. Thus, Blender is able to find python even when the rest of your system can’t. If you open Blender via the executable (not the .bat) in AR Blender, it won’t be able to find python 2.3.

Also, something that AR Blender cannot do (python-wise), is utilize python 2.4 in a version of Blender compiled with python 2.3 (or vise-versa). At least, I didn’t think that was possible, but maybe someone can tell me otherwise?

Windows users are really the only ones that need a python install, most other OS’s come with python automatically. You can temporarily “uninstall” python by merely changing the directory name.

Levi

:rolleyes: Hi Levi, fActually What I did was not to execute the bat file at all.
If you do not touch the bat file ar blender does not run but blender 2.37a does and it finds python. Blender exe not ar.
I copied all the files relating to python that come with ar blender to a directory that has a Standard Blender 2.37a install, not including or touching the bat file at all. or anything related to ar blender. (other than the python files included with it.)

If you open Blender via the executable (not the .bat) in AR Blender, it won’t be able to find python 2.3
.
Untrue. It does find python even if it is not installed.

It may be either the patt.hiro or patt.kanji files that do this or some hidden file within ar’s python, it may simply be the most programs search their own directories first for .dlls and before required dependencies are searched for in other directories.

So to simplify this > I do not have Python 2.3 installed on my system.
I installed Blender 2.37a.> From Blender.org.
I copied all the python files I found in AR Blender + the patt files into the blender install folder > no ar blender stuff and no bat file.
Blender finds Python 2.3.

I moved this to several different directories with the same result.

The files in Blender are as follows> entire structure.
.blender
build
DLLs
Doc
include
Lib
libs
plugins
share
tcl
Tools
Blender (executable)
Blender.html
blenderplayer
copyright
gnu_gettext.dll
GPL-license
Help
INSTALL
LICENSE
msvcr70.dll
NEWS
patt.hiro
patt.kanji
py.ico
pyc.ico
pycon.ico
python
Python23.zip
python23.dll
Python-license
pythonw
README.txt
release_237a.txt
SDL.dll
uninstall(blender)
UNWISE(python)
w9xpopen
zlib.pyd

So there it is. 46.9meg Blender with full python install included.
It is easy to see what files are from blender and what files are from python.
Not so easy to see how exactly this works but who cares. It works.

Maybe I should have posted that I have hacked Blender 2.37a to include a full python install.:slight_smile:

Basically, the Python23 folder included with AR Blender is a full python install. Your system just doesn’t have it included in the PATH environment variable, so it doesn’t know that it has a full python install.

it may simply be the most programs search their own directories first for .dlls and before required dependencies are searched for in other directories

Yes, in this case, that’s the key. When a program is run it looks for files it needs in 1) first, its own directory, 2) second, its parent directory, and 3) third, the paths given in the PATH environment variable. What you’re basically doing is “installing” python (by putting all necessary files within a directory), and then “installing” Blender in the same folder (again, by putting all necessary files within a directory). The result is that Blender 2.37a finds Python 2.3. To make it easier on yourself, you could’ve just copied Blender to the arblender/Python23 folder. Or, since the parent directory is included in the search paths, you could just install Blender into its own folder within the Python23 folder.

Levi

Hi, Upon further investigation it is as simple as installing Python into Blender’s directory or you can copy all the python files into Blender’s directory.

This works for/tested Blender 2.37a and Python 2.3:)
This works for/tested Blender 2.42a and Python 2.4.3:)

The reason I am doing this is I need Blender with a full Python install for a local High School.
The School’s network/management wants me to show the students Blender but does not want me to Install on their Network. Yet.
I want to give the best Blender version possible to the students.
The students will now be able to have this on disk and copy to a safe network directory that will not be erased every Friday when the network is re-imaged.
The full install is very handy for students that have network install problems. Great for presentations too. Good workaround.

Again, Full Blender with Python Install and use of Python dependant scripts from a flash stick or disk without the need for setting variables anyone?:smiley:

I will test this further in the future to see if I can acheive backward compatibility. Many scripts I test need old dlls and I have had some success copying python 2.0.dll or the old dynoise.dll into Blender and other dependencies that the scripts request. If all the needed files are in Blender this may work to install older python, even older blender into the same directory. Interesting.

Anyway that’s it for now, I have lots more scripts to update to the wiki tested with Blender 2.42a before I worry about older versions too much.

I will say this, It is not always the case that your version of linux will have the correct version of python for blender or even an up to date version of blender anyway.

I use free versions of windows. 90 day trial downloads availiable from bill.
xp 64 and xp pro, duel boot, exept for my laptop which has a image disk
I feel it is good practice to re-format my computor every two months anyway.

Thanks for the input Levi.