Need help with starting python

正在查看此主题的用户

Wood

Knight
I can't seem to get python to work. I followed tutorial as best as I could but I don't really understand the step about changing the path variable. The official help file doesn't appear to mention it. When I use "build_module.bat" I get a list of error messages that say something like : "python" is not a recognised command.

Any advice would be greatly appreciated.
 
The problem is because of the path variable. I'll try to explain how to do it as best as I can (Assuming you're using XP):

Go to Control Panel -> System -> Advanced -> Environment Variables

Click on the path variable under System Variables and click edit.

Add ;C:\Python24 to the end of the variable value.
 
If you're using the current version of python it would be C:\Python25
 
The one that says CLASSPATH ? is that the one to edit ?

If i edit that is there any danger to my computer because that is a system file ?
 
im having the same problem with this...i have the current version of python and when i put the variable in the path value line it should look something like this right

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\QuickTime\QTSystem\C:\Python25

i just added it to the end of the line...i dont know if i did it right or what....
 
I. Give. Up...
I tried everything but it STILL says python is not a recognized command.

Oh well, I tried.  :cry:
 
I'll post an updated version of my modified build_module.bat which temporarily sets the Python path within the batch file to take care of that.

Try replacing the contents of your build_module.bat with this:
插入代码块:
@echo off
set OLDPATH=%PATH%
set PATH=C:\Python25;%PATH%

python process_strings.py
python process_sounds.py
python process_particle_sys.py
python process_skins.py
python process_map_icons.py
python process_factions.py
python process_items.py
python process_scene_props.py
python process_scenes.py
python process_troops.py
python process_party_tmps.py
python process_parties.py
python process_quests.py
python process_scripts.py
python process_mission_tmps.py
python process_game_menus.py
python process_simple_triggers.py
python process_dialogs.py

set PATH=%OLDPATH%
del *.pyc
echo.
echo ______________________________
echo.
echo Script processing has ended.
echo Press any key to exit. . .
pause>nul

Note that if you have Python 2.4 installed instead of the latest Python 2.5, you'll need to change this line:
插入代码块:
set PATH=C:\Python25;%PATH%
to
插入代码块:
set PATH=C:\Python24;%PATH%
Also, if "C:\" isn't your root drive, you'll need to change that as well.


EDIT: raphu: you've got your path slightly fudged up there though. You should have a ";" before the "C:\Python25" to separate it.
 
OK, what error are you getting then?
The "python is not a recognized command" type error should be taken care of by the above, but there are other possible errors.
 
i might just be a dumb ass but im supposed to click on build module right...well then a window pops up with this...and its long..so im only going to show the last little bit since it does the same thing over and over....




C:\Program Files\Mount&Bladev.808\ModuleSystem>python process_mission_tmps.py
'python' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\Mount&Bladev.808\ModuleSystem>python process_game_menus.py
'python' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\Mount&Bladev.808\ModuleSystem>python process_simple_triggers.py

'python' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\Mount&Bladev.808\ModuleSystem>python process_dialogs.py
'python' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find C:\Program Files\Mount&Bladev.808\ModuleSystem\*.pyc
Press any key to continue . . .
 
And you've tried replacing the text of build_module.bat with that of above? If so, then you either don't have Python installed or have it installed somewhere else besides the usual place. If you do actually have it installed, where did you install it?
 
OK I changed all the text in there and got passed all the "not recognised" stuff, but now theres more trouble.

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Python24

That is the variable value I set it to.

I have Windows XP.
I have M&B .808.
I have Python 2.5.

What am I doing wrong  :cry:
I want to learn how to mod badly, but I can't even get the thing started  :cry:
 
raphu 说:
i installed it to desk top...
What? You installed Python to your Desktop folder? :neutral:
OK, to be clear, when you install Python, it has an installation path that it installs all of it's files to. By default this is "C:\Python25" if you are installing Python 2.5 and your main hard drive is "C:\" (mine for instance is "H:" instead of "C:\", but that's just me).


EasyCo506: you say you got past that but "now theres more trouble". OK, what trouble? You didn't say.
 
Well I'd post what it says, only I can't copy and paste it.  :???:

Hold on Ill try to type what it says
 
I'll go ahead and throw out a good guess as to your problem though: something wrong in the "module_info.py" file which tells it where to save the compiled files.

You do have to edit that file to tell it where to compile to, the folder you enter there has to already exist, and you have to use forward slashes ("/") instead of backslashes ("\") in the path you give it.
 
后退
顶部 底部