Install Python in Wine

Questions about Wine on Linux
Locked
Rene
Level 1
Level 1
Posts: 5
Joined: Fri Aug 09, 2013 12:40 am

Install Python in Wine

Post by Rene »

Recently, I have problems to install the Windows version of Python in Wine. I need this for another Windows program.

My OS is Ubuntu 13.04 and I added the most recent Wine with "sudo apt-get install wine". I was able to install the program, but installation of Python 2.7.5 (32bit) failed, because the install aborts with an unknown error, and undoes the installation (Your system has not been altered).

Inearlier versions of Ubuntu (certainly also earlier versions of Wine), the installation provided no difficulties.

What could I do?

Rene

PS: I could ask this in the Python forum too. But it seems more likely that you can help me.
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: Install Python in Wine

Post by dimesio »

Is the wineprefix 64 bit? If so, try installing to a 32 bit one. http://wiki.winehq.org/FAQ#32_bit_wineprefix

If that doesn't fix it, post terminal output. http://wiki.winehq.org/FAQ#get_log
Rene
Level 1
Level 1
Posts: 5
Joined: Fri Aug 09, 2013 12:40 am

Re: Install Python in Wine

Post by Rene »

I don't know what a wineprefix is, but I likely installed the 64bit version. Here is the terminal output. Maybe the two "fixme"s are the problem?

Rene

Code: Select all

rene@rene:~/Downloads$ wine msiexec /i python-2.7.5.msi
fixme:storage:create_storagefile Storage share mode not implemented.
fixme:sxs:cache_QueryAssemblyInfo 0x150b60, 0x00000002, L"Microsoft.VC90.CRT,version=\"9.0.21022.8\",publicKeyToken=\"1fc8b3b9a1e18e3b\",processorArchitecture=\"x86\",type=\"win32\"", 0x32f8c8
fixme:sxs:cache_QueryAssemblyInfo 0x150b60, 0x00000002, L"policy.9.0.Microsoft.VC90.CRT,version=\"9.0.21022.8\",publicKeyToken=\"1fc8b3b9a1e18e3b\",processorArchitecture=\"x86\",type=\"win32-policy\"", 0x32f8c8
fixme:msi:ControlEvent_SpawnWaitDialog Doing Nothing
err:msi:ACTION_InstallFiles compressed file wasn't installed (L"C:\\Python27\\Lib\\distutils\\filelist.py")
err:msi:ITERATE_Actions Execution halted, action L"InstallFiles" returned 1603
err:msi:ITERATE_Actions Execution halted, action L"ExecuteAction" returned 1603
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: Install Python in Wine

Post by dimesio »

A wineprefix is simply the directory where Wine puts its fake c: drive. The default is ~/.wine. If you have 64 bit Wine installed and you didn't explicitly create a 32 bit wineprefix, then ~/.wine is 64 bit. 32 bit apps should work in 64 bit wineprefixes, but many don't. So try creating a 32 bit wineprefix following the instructions I linked you to, and install to that.

Alternatively, I think winetricks has a python verb (not home right now, so I can't check), so you could try that. http://wiki.winehq.org/winetricks
Rene
Level 1
Level 1
Posts: 5
Joined: Fri Aug 09, 2013 12:40 am

Re: Install Python in Wine

Post by Rene »

Ok. I tried.

<code>
rene@rene:~$ cd
rene@rene:~$ mkdir .win32
rene@rene:~$ WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg
wine: WINEARCH set to win32 but '/home/rene/.wine32' is a 64-bit installation.
</code>

So this does not work that way. I also tried installing into that folder.

<code>
rene@rene:~$ WINEARCH=win32 WINEPREFIX=~/.wine32 wine msiexec /i Download/python-2.7.5.msi
wine: WINEARCH set to win32 but '/home/rene/.wine32' is a 64-bit installation.
</code>

So no luck too. Without the WINEARCH=win32, the installation aborts as before.

I already tried winetricks using a command I found in the net. But no luck.
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: Install Python in Wine

Post by dimesio »

Rene wrote: rene@rene:~$ cd
rene@rene:~$ mkdir .win32
rene@rene:~$ WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg
wine: WINEARCH set to win32 but '/home/rene/.wine32' is a 64-bit installation.
</code>

So this does not work that way.
You're right, it doesn't work that way. Nowhere in the instructions in the wiki does it say to create the directory first.

Delete the wineprefix you created and try again.
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Re: Install Python in Wine

Post by lahmbi5678 »

Just another nit-picking, sorry, could not resist:

Please avoid typos, like creating a directory ".win32" and then referencing it "WINEPREFIX=~/.wine32". I can understand, that these typos happen really easily, especially as there's a "WINEARCH=win32" before.
Rene
Level 1
Level 1
Posts: 5
Joined: Fri Aug 09, 2013 12:40 am

Re: Install Python in Wine

Post by Rene »

Thanks for this hint. I now generated a 32-bit configuration (it seems), and winecfg opens. But

<code>
rene@rene:~$ WINEARCH=win32 WINEPREFIX=~/.wine32 wine msiexec /i Download/python-2.7.5.msi
</code>

does nothing. I tried to add omit the WINEARCH=win32, but it also does nothing.

I am probably too uninformed about Wine to get that solved.
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: Install Python in Wine

Post by dimesio »

Rene wrote: Download/python-2.7.5.msi
Are you sure that path is correct? On my system the folder is Downloads, not Download.

If that's not it, I don't know. I downloaded python-2.7.5.msi and it installs without any problems on my system.
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Re: Install Python in Wine

Post by lahmbi5678 »

You don't have to specify WINEARCH=win32 more than once. Once the wineprefix is created as 32bit, it will stay that way.


In order to get Python installed, you could try winetricks:

WINEPREFIX=~/.wine32 winetricks --no-isolate python

That would install Python 2.6.
Rene
Level 1
Level 1
Posts: 5
Joined: Fri Aug 09, 2013 12:40 am

Re: Install Python in Wine

Post by Rene »

No luck. "winetricks" just downloads Python and starts the same installer with the same error "Storage share mode not implemented". I also tried "Just for me".

I also tried downloading Python 3.3 64bit. But that does nothing, when I press "Next" in the installation dialog, where the directory is chosen.

Well, it is time for a Linux native version of Euler Math Toolbox. But it would be such a bulk of work.

Thanks for your help, anyway.
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Re: Install Python in Wine

Post by lahmbi5678 »

Hi,

sorry, I don't know, what's going wrong for you.

I'm using opensuse 12.2 32bit and wine 1.6. Python 2.6 (the version that comes with winetricks) installs without issues here. I tried the python-2.7.5.msi and 3.3 (all 32 bit of course), they installed flawlessly, too. Python 3.3 doesn't run, but 2.6 and 2.7 seem to work, didn't do much testing, just tried, if idle comes up without issues.

So it seems, that Ubuntu 64 bit is producing another wine issue, this happened before. You should consider filing a bug in wine's bugzilla. If you've got a 32 bit Ubuntu and/or another 32 bit linux, please try it there.
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: Install Python in Wine

Post by dimesio »

I'm on 64 bit openSUSE 12.3, and python-2.7.5.msi installs fine in both a 32 bit and a 64 bit wineprefix. This is in Wine 1.7.0.

Rene: looking back, I see your original post says you installed the "most recent" version of Wine, but you never actually said what version that was. What's in your distro's repository is not necessarily the latest Wine. You can check the version in a terminal by typing

Code: Select all

wine --version
If the version is not 1.6 or 1.7.0, you do not have the latest version and should upgrade.
Locked