Install python in wine - configuring paths from winetricks?

8,748

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.

Share:
8,748
karim
Author by

karim

Updated on September 18, 2022

Comments

  • karim
    karim over 1 year

    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.

  • karim
    karim over 11 years
    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?
  • Bruno Pereira
    Bruno Pereira over 11 years
    Working on it, I will let you know as soon as I have this on a vbox running.
  • RyanNerd
    RyanNerd over 8 years
    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.