setting py path in XP please help

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

IngieBee
Posts: 120
Joined: Sun Oct 13, 2002 8:26 pm
Contact:

setting py path in XP please help

Postby IngieBee » Sun Nov 24, 2002 9:46 am

elysiun seems to be down for a while now (at least I can't get on for some reason?) so I'm asking here hoping to get some wise a... person to help me :)

I'm having trouble setting my python path. I now have wondows xp, and according to the python gui, my path is this:

['C:\\PYTHON22\\Tools\\idle', 'C:\\PYTHON22', 'C:\\Python22\\DLLs', 'C:\\Python22\\lib', 'C:\\Python22\\lib\\lib-tk', 'C:\\Python22\\lib\\site-packages']

After cleaning it up per the instructions at the ter2blend site, I got this:
SET PYTHONPATH=C:\PYTHON22\Tools\idle;C:\PYTHON22;C:\Python22\DLLs;C:\Python22\lib;C:\Python22\lib\lib-tk;C:\Python22\lib\site-packages

I put this in my AUTOEXEC.NT since the autoexec.bat is supposidly not used anymore... it didn't help. I'm trying to use Hos' obj exporting script: either OBJIO_wings_fix.py or OBJIO.py however both keep giving me the error:

PYTHON SCRIPT ERROR:
Traceback (most recent call last):
File "c:/Python22/scripts\OBJIO_wings_fix.py", line 104, in ?
import os
ImportError: No module named os

import string comes before import os, it seems to go through that fine?? they are both py modules in the lib directory, no?

Please, if anyone knows what's wrong, could you help me? I've tried it on Blender 2.23 and 2.25, but same problem :(

If anyone knows what I'm doing wrong, I'd sure appreciate it. I even updated my py (wich was 2.2.1 to the newest python, what 2.2.5? something like that, but no help. It's a full installation.

Thanks for any help, all check to see if anyone was able to help in the morning here in California, so if you don't here, I'm gonna check, just have to sleep now. Thanks again

Love Ingie

theeth
Posts: 1184
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Postby theeth » Sun Nov 24, 2002 6:16 pm

To set the Pythonpath on XP (or NT 4.0 or Win 2K):

    go to the Control panel
    double click System
    go to the Advanced tab
    click on Environement Variables

    in the System Variables window
    check if you have a variable named PYTHONPATH

    if you have one already:
    check that it points to the right directories

    if you don't have one already:
    click the New button and create it


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

    Open up Blender with the default scene (or use Ctrl-X to get back to it)
    Pull down the Info window at the top
    In the Python button at the left of the screen
    Enter the path to the Lib directory in your Python distro (usually, something like c:/Python22/Lib/)
    Save the user defaults with Ctrl-U


I hope that's clear

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

IngieBee
Posts: 120
Joined: Sun Oct 13, 2002 8:26 pm
Contact:

Postby IngieBee » Sun Nov 24, 2002 7:00 pm

OMG It worked, it worked it worked!!!

What finally worked, is telling blender the path to the libraries. I thought it only needed the path to Python22! Ok, now I can get back to work, er.... after I take the kids to see HP.

Thanks Theeth, so so much!!

Love ya, Ingie

theeth
Posts: 1184
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Postby theeth » Sun Nov 24, 2002 10:54 pm

WOOHOO!

I'm glad to hear it worked.

Martin
Life is what happens to you when you're busy making other plans.

- John Lennon

offel
Posts: 2
Joined: Sun Dec 29, 2002 11:35 pm

Postby offel » Sun Dec 29, 2002 11:38 pm

:cry: snif snif
i can't get it too work!!!
blender says: .ter file is not a blend file
and in it's dos screen it says:unknown file
why,what am i doing wrong?????????

i have windows xp
and i did all the above(atleast i think i did it right??)

please help me!!!!!!!!!!!!!!!!!!!

theeth
Posts: 1184
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Postby theeth » Mon Dec 30, 2002 4:40 am

blender is right, a .ter isn't a .blend file, that why Blender cannot load them directly.

Did you try reading the instructions on the Ter2Blend script page?

Martin
Life is what happens to you when you're busy making other plans.

- John Lennon

offel
Posts: 2
Joined: Sun Dec 29, 2002 11:35 pm

Postby offel » Mon Dec 30, 2002 1:26 pm

yes that's why it's so strange
but last night at 02.00 h i installed a old python version v2.0
and now i get the right screen when pressing alt p
when i use a newer version(full install) i get an error saying python22.dll doesn't work with this python version???
only get it to work with v2.0,does anybody knows why ??

i,m very new to this,but i got to start somewhere,right?

now i,m going to read all the other posts to find why i don't see the backgroundfile!! :shock: :lol:
thanks!

compman
Posts: 1
Joined: Mon Mar 31, 2003 6:39 pm

Postby compman » Mon Mar 31, 2003 6:54 pm

hey guys... I'm new around here so sorry if I ask stupid questions..

I have Python 2.2 installed, I get the script up, and it will say working for awhile but before it finishes it exits abruptly and dosn't finish the job... I'm using blender 2.26, version 3 of TER2BLEND, Windows XP. Here is what the console tells me:

Terragen Terrain file: continue
Traceback (most recent call last):
File "Terrain", line 286, in bevent
File "Terrain", line 304, in draw
File "Terrain", line 378, in sun
AttributeError: 'module' object has no attribute 'Get'


All of that means nothing to me, but can anyone out there help?
-Compman


Return to “Python”

Who is online

Users browsing this forum: No registered users and 2 guests