How to use the plugins?

:frowning:

Nothing ever happens, nothing happens at all. The needle returns to the start of the song and we all sing along like before. And we’ll all be lonely tonite and lonely tomorrow - “Nothing ever happens” by Del Amitri

Hm, no error, no output either. (Schlops rubs his nose and starts thinking) Is the python-executable in your PATH? In other words, start python from your console with python. Is this working? If not, add the python-executable to your path, maybe by creating a link in a PATH-directory.

Yep, it works (so now I quess I can assume that Python works ;))

Sh!t, you are really doomed. :frowning:
STAY AWAY FROM ME!!! :wink:

This can’t be, theeth’s script should work, or at least give you an error. Are you really in the text-window (Shift-F11)?
Start with an empty blend-file, open a text-window (Shift-F11) add a new script (as described by theeth) and just type something. You should get an error saying “There is no variable named ‘something’” in your terminal, not inside blender. Oh and start blender from a terminal-window, not with Alt-F2 if you are using KDE. :wink:

YIPPII!
well, not exactly… but now I found out why didn’t receive any errormessages :slight_smile: I’ve started Blender with shortcut on desktop :stuck_out_tongue:
Okay, I started it from console, and tried out the grass3.blend script, hereäs what I got as error:

PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "Grass3", line 40, in ?
  File "/usr/local/lib/python2.0/random.py", line 23, in ?
    import whrandom
  File "/usr/local/lib/python2.0/whrandom.py", line 134, in ?
    _inst = whrandom()
  File "/usr/local/lib/python2.0/whrandom.py", line 45, in __init__
    self.seed(x, y, z)
  File "/usr/local/lib/python2.0/whrandom.py", line 56, in seed
    import time
ImportError: No module named time


now… what do I need to do?

look for the “Time module fix for Linux” info.

Martin

Actually, it seems that the time- and other modules are not installed by default, there is no need for the ‘time module fix’, follow these instructions and you should be able to use any script normally, at least it worked for me:

In the python-2.0.1/modules directory edit the Setup file (not Setup.in), using any text editor. On line 114 you will find this:

#shared

change this to:
shared

so just remove the ‘#’.

Save it, log in as root, cd to the Python-2.0.1 directory, do a ‘make clean’ first, then ‘./configure’ & ‘make’ as normal, followed by ‘make install’.
The time module as well as some other important modules (dynamica linux testers!) should then be properly installed. You should be able to run RipSting’s script without problems, as well as others.

Well, i did exactly as you told, but I got the same errormessage…

The only thing I can think of is that you don’t have a PYHONPATH variable, if I remove that, I get the same error.
Find .bashrc in your home directory, add this line at the end:


export PYTHONPATH=/usr/local/lib/python2.0:/usr/local/lib/python2.0/plat-linux2:/usr/local/lib/python2.0/lib-tk:/usr/local/lib/python2.0/lib-dynload:/usr/local/lib/python2.0/site-packages

That ‘should’ work…fingers crossed… :wink:

I used the fake “time.py” that was mentioned in the “Finished Projects”-forum under “RipSting’s Grass Generator and L…(something)”
Now I get message “cannot import name random” even though the random module is supposed to come with Python 2.0.1

So: Now what?

You did see the PYTHONPATH post above?

Yes I saw it, and added it to the file, but no help… I get the “cannot import name random”

The ‘cannot import name’ error at least indicates that the module is found but not the function. Part of this has been said before, but what exactly do you get when you run this in Blender:


import sys
print sys.version, '
'
print sys.path, '
'

import random
print random.__file__, '
'
print dir(random)

following prints on console:

2.0 (#1, Mar 5 2001, 15:53:21)
[GCC 2.95.2 19991024 (release)]

[’/usr/local/lib/python2.0’, ‘/usr/local/lib/python2.0/plat-linux2’,
‘/usr/local/lib/python2.0/lib-tk’, ‘/usr/local/lib/python2.0/lib-dynload’,
‘/usr/local/lib/python2.0/site-packages’, ‘/usr/lib/python2.0/’,
‘/usr/local/lib/python2.0/’,
‘/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/python2.0/plat-linux
2’,
‘/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/python2.0/lib-tk’,
‘/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/lib-dynload’,
‘/misc/blender-creator-2.23/.’, ‘/usr/local/lib/python2.0’]

PYTHON SCRIPT ERROR:
Traceback (most recent call last):
File “Text”, line 5, in ?
File “/usr/local/lib/python2.0/random.py”, line 23, in ?
import whrandom
File “/usr/local/lib/python2.0/whrandom.py”, line 134, in ?
_inst = whrandom()
File “/usr/local/lib/python2.0/whrandom.py”, line 45, in init
self.seed(x, y, z)
File “/usr/local/lib/python2.0/whrandom.py”, line 56, in seed
import time
ImportError: No module named time

Then what do you get when you type this in the terminal:


ls /usr/local/lib/python2.0/lib-dynload

if the timemodule.so is not in the list, it failed to install properly. Did you get any errors and/or warnings during compilation/installation? Did the test run properly?

no such file or directory :stuck_out_tongue:

if the timemodule.so is not in the list, it failed to install properly. Did you get any errors and/or warnings during compilation/installation? Did the test run properly?

Now that you mention it… I did get some error, but I didn’t mind it, and don’t remember what it is… is there somesort of “install log” where it would show?

Well, obviously something has seriously gone wrong if that directory is not available! Although I mentioned the test, I forgot to tell that you can test python with ‘make test’, any ouput of these tests is put in python2.0/tools/test or something like that. I can’t remember the exact directory name, for some reason I can’t login here from Linux (tried Konqueror & mozilla), so I constantly have to switch back and forth between windows & Linux.
Anyway, if the modules compiled you will also find them in python2.0/lib directory. IF they compiled…

could there be a problem with previous version of python? I found out that I have some python1.5 files also in /usr/lib/python1.5…

that would indeed be a problem, depending on which version you installed last I guess.

Maybe you should tyr uninstalling both of them and making a clean Python 2.0 instal.

Martin

It got propably installed with the Linux, but the version is 1.5something.
<stupid question>how do I uninstall them?</stupid question>