|
|||||||
![]() |
|
|
Thread Tools |
|
||||
|
That should have been done ages ago, but anyway...
Ok, so here's how it will work: if you have written some piece of text on how to set the Pythonpath variable or small tricks to instal many versions of Python on the same comp, things like that, just post it here. Please, only post meaningful and useful information. Martin
............................................
Life is what happens to you when you're busy making other plans. - John Lennon |
||||
|
#1
|
||||
|
|
|
||||
|
in french but easy to translate with google's tool:
http://cobalt3d.free.fr/didact/pytho...igerlepath.htm http://jmsoler.free.fr/didacticiel/b...cohabr2pyt.htm And in this page: http://jmsoler.free.fr/didacticiel/b...n_script00.htm look at the F/ paragraph
............................................
Ze French Group : ZOO-Blender | Starter Kit Blender (livre en français) Daily updated Bpy API | Ze best french tutorials site. |
||||
|
#2
|
|
||||
|
Python Path For Windows 2k and XP, Python20 !!
Install Python in the root of your C. i.e. C:\Python20\ Go to your start button, go up to My Computer and Right click it and go to properties. Click on the Advanced tab, click on Environment Variables button at the bottom. Below the System Variables box, (the second box), hit New. In the Variable Name box, type PYTHONPATH In the Variable Value box, type this exactly: C:\PYTHON20;C:\PYTHON20\DLLS;C:\PYTHON20\LIB;C:\PY THON20\LIB\LIB-TK You can copy and paste that. Hit OK repeatedly. Reboot. |
||||
|
#3
|
|
||||
|
To set the Pythonpath on XP (or NT 4.0 or Win 2K):
try rebooting and restarting Blender so that the internal interpreters registers the new PYTHONPATH if that doesn't work, there's a fix that can be applied directly in Blender. Be aware that this will not work with script that require the use of dynamic libraries.
Martin
............................................
Life is what happens to you when you're busy making other plans. - John Lennon |
||||
|
#4
|
|
||||
|
I see that I'm repeating a lot here, but here it goes anyway, you can never read this enough times
First, despite that python by now has moved on to version 2.2, Blender currently is still based on python2.01. It is possible to use higher python versions, but if you want full compatibilty, you have to install python2.01. [color=yellow]UPDATE:[/color][color=orange] As of Blender version 2.26 (as well as 'funblender') this is no longer true, which were compiled with python2.2, so for these it is best to install python2.2, NOT python2.01. [/color] [color=orange]WINDOWS[/color] 1. Get python2.0 from http://www.python.org/2.0.1/ Direct link to the installer(might not work, you might have to use the above link instead): http://www.python.org/ftp/python/2.0.1/Python-2.0.1.exe To make sure that python when run from Blender can find the files it needs, you need to set a so-called 'environment variable' which contains all the directories python needs to be able to run properly. 2. PYTHON LIB SHORTCUT: There is a shortcut to do this, which will make it possible to run most scripts, but not all of them, so it is better to set the PYTHONPATH variable, but if you don't want to do that, you can try this. If you want to set the full pythonpath, skip ahead to part 3. It is possible to specify the most important python directory in Blender itself, you do that by specifying this in the user-defaults window, this window is hidden away at the top of the main Blender window. Drag the header downwards to find it, you can also use the windows icon, then selecting the 'i' icon (info-window). On the left side you will find a button with the name 'Python:', click that, and type the full path to the python lib directory, use the path to wherever you installed python, for me it would be: Code:
That is all, this will be enough for most scripts. 3. FULL PYTHONPATH: After installing python and restarting your computer, you will find a new menu entry in the windows 'Start' menu, there is an option called 'python(commandline)', select that, and python will start in a dos-console printing something like this on the screen: Code:
Code:
Any other ones you don't need to add to the environment variable, but you can do that anyway if you want. Now we need to create an environment variable that contains the same directories. (btw, To close the python console use 'ctrl-z') This will depend on what windows version you use, for Win98 for instance you have to add this variable to your autoexec.bat Open it with notepad for instance, and add the line 'SET PYTHONPATH=' plus the important directories that python printed in the console window as above. So for me it would look like this: Code:
To set environment variable on Win2000 or WinXP, see the post by Enzoblue or theeth above. [color=orange]LINUX[/color] Most if not all distributions already include a version of python, if not, you will have to compile and install it yourself. As this is not unusual for Linux users, I won't repeat the steps here. 1. To find out what you have to add to your pythonpath, open a shell/terminal and start python (type python or python2.0). Then type 'import sys' followed by 'print sys.path', which will produce something like this: Code:
Code:
In case you use a tcsh based shell, you need to add this to .cshrc, in which case it is slightly different: Code:
After you set the pythonpath, log out and back in again to make it active. For both platforms, a link that might be helpful: http://www.janw.gothere.uk.com/pythoninstall.html
............................................
There is no excellent beauty that hath not some strangeness in the proportion. Sir Francis Bacon (1561 - 1626) |
||||
|
#5
|
|
|||
|
I've tried the linux method but it doesn't seem to work. Mac OS X.2.2, Python 2.2.1, Blender Publisher 2.2.5
|
|||
|
#6
|
|
||||
|
For those Linux-freaks who want to put a shortcut on their KDE-/GNOME-Desktop:
Open your favourite texteditor and write down this lil script: Code:
Now create a desktop-icon (rightclick on desktop -> new... and so on), name it blender. In the properties window for your desktop-icon under Execute -> command (this for KDE, I don't know how this is done in GNOME, but it should work in a similar way) put bstart (maybe you need the full path for that script), switch the Run in terminal checkbox on (KDE, GNOME might be similar) and everything should work fine. Thanks to Clawz for being the guinea pig
............................................
Stay Rude! |
||||
|
#7
|
|
||||
|
I dont completely understand this.. What would i have to type and where, if i were to use Yable and python was installed to e:\Python\ ?
............................................
^__^\' |
||||
|
#8
|
|
||||
|
In NT-style Windows (NT, 2K, XP) you do not have to reboot to make the system environment visible to all the apps. Log off and on is enough. It bothers too, as you have to close all the running apps, but it is usually much faster then a full reboot.
|
||||
|
#9
|
|
|||
|
Quote:
|
|||
|
#10
|
|
|||
|
how do I set my path in OS X 10.2.6? I have python already installed fomr default os X install. Where would I set the path from? Thanks
|
|||
|
#11
|
|
||||
|
same problem...
mac osx 10.2.6... blender 2.25, 2.27 or 2.28a... python 2.2.3 and 2.3... need a solution... |
||||
|
#12
|
|
|||
|
In the beginning of your sscripts, put this:
import sys sys.path.extend(['', '/usr/lib/python2.2', '/usr/lib/python2.2/plat-darwin', '/usr/lib/python2.2/lib-tk', '/usr/lib/python2.2/lib-dynload', '/usr/lib/pyth on2.2/site-packages']) that is 2 lines, first line is "import sys" and the rest is the ssecond line Quote:
|
|||
|
#13
|
|
||||
|
I'm still meeting troubles...
an example overall: makehuman generates an error message on import os what can I do??? help me please... and happy blending |
||||
|
#14
|
|
||||
|
I just set my path according to the instructions given above, ( the post that says to copy and paste if you like ) and I am assuming, (sorry if I sound like a total bone head here) that where it says to type in PYTHON20, I should instead type in PYTHON2.2?
............................................
Here's a nodes tutorial on Using UV mapping to define material values: http://blenderartists.org/forum/showthread.php?t=73088 And here's another nodes tutorial on how to do a custom sequence wipe: http://blenderartists.org/forum/showthread.php?t=90989 |
||||
|
#15
|
|
||||
|
Yes, of course. These were examples paths and weren't updated for Python 2.2.3
Martin
............................................
Life is what happens to you when you're busy making other plans. - John Lennon |
||||
|
#16
|
|
||||
|
Thanks Theeth!
............................................
Here's a nodes tutorial on Using UV mapping to define material values: http://blenderartists.org/forum/showthread.php?t=73088 And here's another nodes tutorial on how to do a custom sequence wipe: http://blenderartists.org/forum/showthread.php?t=90989 |
||||
|
#17
|
|
||||
|
Quote:
What's wrong? When i'm exporting scene from povanim i get error log and script crashes: [color=red] Don't know exactly what os ( maybe posix we run but we are runing icon_smile.gifFile "lanc_povanim.py", line 1097, in bevent1... ...line 899, in export_file ...line 10170, in Test_exportVers ...line6495, in writeCamera AttributeError: 'module' object has no attribute 'atan' Error Totblck: 7 button string len: 8 0x858c39c button string len: 8 0x858297c button string len: 8 0x86d8fa4 button string len: 8 0x858bdc4 button string len: 8 0x858bf04 button string len: 8 0x858bf54 button string len: 384 0x8a3e43c [/color] Other time at export script crashes because of other attribute. What's going on? My python version : 2.2 I'm using blender with dedicated povanim versions, it alvays crashes. OS: GNU/Linux Wings works great! At the beginning i was in trouble with erlang and libesdl compilation, but now it works very stable.
............................................
decex.pl |
||||
|
#18
|
|
||||
|
ok, I am writing a version of povanim "special debian users" without math module...
............................................
Ze French Group : ZOO-Blender | Starter Kit Blender (livre en français) Daily updated Bpy API | Ze best french tutorials site. |
||||
|
#19
|
|
|||
|
um, I'm a little confused. I went and did Enzoblue's instructions and now what do I do? Is Python supposed to be running when Blender is? Or how do I get these scripts to work now?
|
|||
|
#20
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|