How to fix "Python not recognized..." (now also for Windows 7)

Users who are viewing this thread

Caba`drin said:
Make sure you set the folder privileges/permissions to allow for read/write. That looks like Windows UAC getting in the way.
Right click on your Warband folder, open properties. Click on the Security tab. Go to "To change permissions click edit: EDIT" and make sure "Allow" is ticked for read, write, modify, etc. After, be sure that it carried down to the enclosed folders (it probably won't) so do the same for \Modules\ and your specific module folder.
You're a life saver! I read through 13 pages of advice with pointless efforts only to finally stumble across your fix, I will forever be in your debt! :grin:
 
DelcoreXD said:
Python - ";C:\Python27"

Path - C:\Python25\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules\Tutorial_Module
This is wrong, this is so wrong.
Fisrt of all, which version of Python have you installed, and where? You're referencing both 2.7 and 2.5, and the "set PATH" thing you posted also references 2.5. Which is it?
Also, oyu should not have added a separate "Python" var up there with the TEMP and TMP, you should have added the Python reference at the end of the "Path" var, not in the beginning, and you definitely should NOT have referenced your mod in there, and please don't tell me you've moved your entire PRogram Files into the Python folder.
Sorry if I'm acting weird, but I'm just worried that you may have done catastrophic damage to your PC, and that would be horrible. Let's hope this is not the case.
Here's an example of how my own path looks:
C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Python27;C:\Program Files\TortoiseHg\;E:\Programs\3ds Max 2010\Backburner\;C:\Program Files\Common Files\Autodesk Shared\
Full of all kinds of different ****e, as you can see.
 
Yes, this is sort of all right. However.
DelcoreXD said:
Erased the Python up there with the Temp and TMP. Also have my official path set as this -
C:\Python27\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules\Tutorial_Module
Let me quote myself:
Lumos said:
Here's an example of how my own path looks:
C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Python27;C:\Program Files\TortoiseHg\;E:\Programs\3ds Max 2010\Backburner\;C:\Program Files\Common Files\Autodesk Shared\
Full of all kinds of different ****e, as you can see.
Lumos said:
and you definitely should NOT have referenced your mod in there
Which means that your mod folder has nothing to do in the Path; and that currently it makes no sense, given that you're linking to a path that does not even exist (given that you've not moved your Program Files to the Python folder (thank God!)). In any case, erase that Steam-whatever reference to your mod from the Path, and look at how mine looks (especially the highlighted Python part).
If your path is so empty, I believe your OS may not function correctly at all times, as the Path contains references to all places that contain executable-through-shell programs, like a lot of the built-in Windows utilities. And that's why you need to SET PATH at the beginning of your build_module - because the python.exe which needs to be run from the commandline is not found in that non-existant directory. :wink:
Hope your PC works properly though. Seeing a path like yours is quite disconcerting.

P.S.: I have no idea what the CoH mod you're talking about is. Looking at the picture you posted, there is a folder that has this in its name, but I really don't know what it is, so I wasn't in any way talking about it.
 
Oh what a mess, I see this was not solved so I will look into why.
DelcoreXD said:
IdfEzId.png
I am very sure Python should not be a Variable listed above TEMP and TMP Variables, mine has only TEMP and TMP


Now as for the export directory
Code:
export_dir = "C:/Program Files (x86)/Steam/SteamApps/common/MountBlade Warband/Modules/MarchofRome_V0.3/MoR Test/"

This is how my module_info.py looks for the compiling directory it should be similar if not same nearly to yours.
I included the /MoR as the trick I learned to get python working was to make a new folder to keep all the compiled text files so you can make patches out of them as well, very optional but useful and you only have to copy and paste the text files into the module folder after compiling. Because for some reason the regular plug and chug into module folder does not overwrite text files so a folder copy paste can do that.
 
SeRgYu said:
Ok so many users encountered this problem while trying to build the module in the module system, and I couldn't find any thread showing how to fix this problem in Windows 7, like I had...So...first you are going to open the Start button and click on the "Control Panel" option like here :

startj.png

Then click on "System and Security" :

systemsecurity.png

Now click on "System"

systemuq.png

And click on "Advanced system settings"

advancement.png

..."Environment variables"

enviroment.png

and then...

xddc.png

If I missed something please contact a moderator to edit my post.
If you still miss something here is a video :
http://www.youtube.com/watch?v=jKNW5AGOMCQ&hd=1
It doesn't show up the screenshots , the video can't be accessed anymore .
Can you post it again?
 
Another problem: I'm so derp that I wrote C :\ with the space in the middle , and when I want to change it leaving the space , the space returns . I tried to restart the computer , but it's still there , and python can't run . How can I do?
 
I'm a few years late i know but i keep getting this damn issue when i ever open Module_Build.bat i get this :  Initializing...
variables.txt not found. Creating new variables.txt file
Compiling all global variables...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Traceback (most recent call last):
  File "process_global_variables.py", line 106, in <module>
    save_variables(export_dir, variables,variable_uses)
  File "C:\Users\User\Desktop\Module_system 1.171\process_operations.py", line 1
71, in save_variables
    file = open(export_dir + "variables.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/variables.txt'
Exporting strings...
Traceback (most recent call last):
  File "process_strings.py", line 26, in <module>
    save_strings(strings)
  File "process_strings.py", line 9, in save_strings
    ofile = open(export_dir + "strings.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/strings.txt'
Exporting skills...
Traceback (most recent call last):
  File "process_skills.py", line 32, in <module>
    save_skills()
  File "process_skills.py", line 15, in save_skills
    ofile = open(export_dir + "skills.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/skills.txt'
Exporting tracks...
Traceback (most recent call last):
  File "process_music.py", line 23, in <module>
    save_tracks()
  File "process_music.py", line 15, in save_tracks
    file = open(export_dir + "music.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/music.txt'
Exporting animations...
Traceback (most recent call last):
  File "process_animations.py", line 61, in <module>
    write_actions(animations,len(action_codes),action_codes,"actions.txt")
  File "process_animations.py", line 24, in write_actions
    file = open(export_dir + file_name,"w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/actions.txt'
Exporting meshes...
Traceback (most recent call last):
  File "process_meshes.py", line 25, in <module>
    save_meshes()
  File "process_meshes.py", line 9, in save_meshes
    ofile = open(export_dir + "meshes.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/meshes.txt'
Exporting sounds...
Traceback (most recent call last):
  File "process_sounds.py", line 51, in <module>
    write_sounds(sound_samples, sounds)
  File "process_sounds.py", line 13, in write_sounds
    ofile = open(export_dir + "sounds.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/sounds.txt'
Exporting skins...
Traceback (most recent call last):
  File "process_skins.py", line 105, in <module>
    export_skins(skins)
  File "process_skins.py", line 45, in export_skins
    ofile = open(export_dir + "skins.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/skins.txt'
Exporting map icons...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_map_icons.py", line 38, in <module>
    save_map_icons(variables,variable_uses,tag_uses,quick_strings)
  File "process_map_icons.py", line 9, in save_map_icons
    ofile = open(export_dir + "map_icons.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/map_icons.txt'
Exporting faction data...
Traceback (most recent call last):
  File "process_factions.py", line 70, in <module>
    save_factions(relations)
  File "process_factions.py", line 34, in save_factions
    file = open(export_dir + "factions.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/factions.txt'
Exporting item data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_items.py", line 72, in <module>
    write_items(variables,variable_uses,tag_uses,quick_strings)
  File "process_items.py", line 19, in write_items
    ofile = open(itemkinds_file_name,"w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/item_kinds1.txt'
Exporting scene data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_scenes.py", line 77, in <module>
    save_scenes(variables,variable_uses,tag_uses)
  File "process_scenes.py", line 46, in save_scenes
    ofile = open(export_dir + "scenes.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/scenes.txt'
Exporting troops data
Traceback (most recent call last):
  File "process_troops.py", line 107, in <module>
    save_troops()
  File "process_troops.py", line 13, in save_troops
    file = open(export_dir + "troops.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/troops.txt'
Exporting particle data...
Traceback (most recent call last):
  File "process_particle_sys.py", line 61, in <module>
    save_particle_systems()
  File "process_particle_sys.py", line 29, in save_particle_systems
    ofile = open(export_dir + "particle_systems.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/particle_systems.txt'
Exporting scene props...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_scene_props.py", line 32, in <module>
    save_scene_props(variables,variable_uses,tag_uses,quick_strings)
  File "process_scene_props.py", line 10, in save_scene_props
    ofile = open(export_dir + "scene_props.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/scene_props.txt'
Exporting presentations...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_presentations.py", line 33, in <module>
    save_presentations(variables,variable_uses,tag_uses,quick_strings)
  File "process_presentations.py", line 11, in save_presentations
    ofile = open(export_dir + "presentations.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/presentations.txt'
The system cannot find the path specified.
Exporting parties
Creating new tag_uses.txt file...
Traceback (most recent call last):
  File "process_parties.py", line 69, in <module>
    save_parties(parties)
  File "process_parties.py", line 12, in save_parties
    file = open(export_dir + "parties.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/parties.txt'
Exporting quest data...
Traceback (most recent call last):
  File "process_quests.py", line 30, in <module>
    save_quests()
  File "process_quests.py", line 9, in save_quests
    ofile = open(export_dir + "quests.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/quests.txt'
Exporting scripts...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_scripts.py", line 40, in <module>
    save_scripts(variables,variable_uses,scripts,tag_uses,quick_strings)
  File "process_scripts.py", line 10, in save_scripts
    file = open(export_dir + "scripts.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/scripts.txt'
Exporting mission_template data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_mission_tmps.py", line 64, in <module>
    save_mission_templates(variables,variable_uses,tag_uses,quick_strings)
  File "process_mission_tmps.py", line 38, in save_mission_templates
    file = open(export_dir + "mission_templates.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/mission_templates.txt'
Exporting game menus data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_game_menus.py", line 47, in <module>
    save_game_menus(variables,variable_uses,tag_uses,quick_strings)
  File "process_game_menus.py", line 22, in save_game_menus
    ofile = open(export_dir + "menus.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/menus.txt'
exporting simple triggers...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_simple_triggers.py", line 24, in <module>
    save_simple_triggers(variables,variable_uses,simple_triggers,tag_uses,quick_
strings)
  File "process_simple_triggers.py", line 8, in save_simple_triggers
    file = open(export_dir + "simple_triggers.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/simple_triggers.txt'
exporting triggers...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_dialogs.py", line 199, in <module>
    save_triggers(variables,variable_uses,triggers,tag_uses,quick_strings)
  File "process_dialogs.py", line 47, in save_triggers
    file = open(export_dir + "triggers.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/triggers.txt'
Checking global variable usages...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file


______________________________


Script processing has ended.
Press any key to exit. . .
 
Already did mate, Nothing works for me in that guide. I also did give permission to Mount and Blade warband files and the other ones i disabled my UAC too
 
These are the lines that i see when i open my module_info.py with notepad++ : # Point export_dir to the folder you will be keeping your module
# Make sure you use forward slashes (/) and NOT backward slashes (\)

export_dir = "../WOTS/Modules/MyMod/"
#export_dir = "C:/Program Files (x86)/Mount&Blade/Modules/Native/"
 
KaToZ said:
Nothing works for me in that guide.
KaToZ said:
These are the lines that i see when i open my module_info.py
... You don't seem to have done what you should've, as detailed in the guide:
wjl21.png

However, your initial error...
KaToZ said:
Code:
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blad
e/Modules/Native/variables.txt'
... suggests that you did change the lines, or at least uncommented the second one. As in the "visual example" above, you need to change this
Code:
export_dir
value to point to your mod's directory. Remember to add the forward slash at the end!
 
So, i need to remove the WOTS thing from Module_info.py and replace it with the location of my game?
 
Back
Top Bottom