I am trying to install Python 2.6 on WINE 1.5 in Ubuntu 12.04. (Yes, I need the WINE version, not the native Ubuntu version).

I have WINE 1.5 running just fine. I do

winetricks python26

Which seems to install python26 just fine, but in the ~/.local/share/wineprefixes/python26/ directory, rather than in .wine/c_drive/...

When I try wine python I'm told

wine: cannot find L"C:\\windows\\system32\\python.exe"

How do I tell wine to look in the location where winetricks put this file? Presumably there is a way to set python path?

My Attempts

I did try copying the python.exe from the ~/.local/share/wineprefixes/python26/ directory into the .wine/drive_c/system32 directory, but then simply get an error about a missing DLL:

err:module:import_dll Library python26.dll (which is needed by L"C:\\windows\\system32\\python.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"C:\\windows\\system32\\python.exe" failed, status c0000135

but that doesn't seem the right way to do this anyhow.

I also tried running winecfg and adding an application, and pointing it to the python.exe file in the ~/.local/share/wineprefixes/python26/ directory, but I get the same

wine: cannot find L"C:\\windows\\system32\\python.exe"

error. Thanks.

2 Answers 2


When you run wine python, wine will assume that you are running it from the default prefix in ~/.wine.

To make it use another prefix, in your case you need to running with the WINEPREFIX option as such:

WINEPREFIX=/path/to/wineprefix wine executable

It should do the trick.

  • Thanks, but I still get the error err:module:import_dll Library python26.dll (which is needed by L"C:\\windows\\system32\\python.exe") not found when I use that. What did I miss?
    – cboettig
    Commented Oct 1, 2012 at 20:01
  • Working on it, I will let you know as soon as I have this on a vbox running. Commented Oct 2, 2012 at 7:56
  • I know this is an old post. I think you were getting the missing DLL message because you had copied the python.exe into the system32 directory so wine is trying to execute python from the wrong place.
    – RyanNerd
    Commented Dec 28, 2015 at 7:49

I think you can use win32_addpath.py in C:\Python26\Tools\Scripts\:

  1. Open cmd by wine

    wine cmd

  2. change directory to Python26 folder

    cd /home//.wine/drive_c/Python26/

  3. run the script

    python.exe Tools/Scripts/win32_addpath.py Hope it gonna hep.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .