我安装了64位Debian稳定Linux,运行非常好:
Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux我想在其中安装32位python-3.4 (也是为了XP Windows支持)。我试过:
$ wine msiexec /i python-3.4.0.msi 但是得到了以下错误:
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:module:import_dll Loading library python34.dll (which is needed by L"C:\\python34\\python.exe") failed (error c000007b).
err:module:LdrInitializeThunk Main exe initialization for L"C:\\python34\\python.exe" failed, status c0000135
err:msi:ITERATE_Actions Execution halted, action L"UpdatePip" returned 1627
err:msi:ITERATE_Actions Execution halted, action L"ExecuteAction" returned 1627在尝试运行时:
$ wine python错误是:
wine: cannot find L"C:\\windows\\system32\\python.exe"我该如何解决这个问题?谢谢你的帮助。
编辑:这显然不是安装Python for Windows的理想方法,但它非常方便,因为可以在Linux中开发和测试应用程序,然后使用葡萄酒中的pyinstaller为Windows创建可执行文件。这在Debian稳定的32位Linux中工作得很好。
Python在~/.wine/drive_c/python34中安装如下:
$ ls -l
total 4168
drwxr-xr-x 34 cardio cardio 4096 Feb 13 15:10 Lib
-rwxr-xr-x 1 cardio cardio 102400 Mar 16 2014 py.exe
-rw-r--r-- 1 cardio cardio 4044800 Mar 16 2014 python34.dll
-rwxr-xr-x 1 cardio cardio 102912 Mar 16 2014 pyw.exe
drwxr-xr-x 2 cardio cardio 4096 Feb 12 08:23 Scripts
drwxr-xr-x 5 cardio cardio 4096 Feb 11 23:10 Tools但是在运行py.exe时:
$ wine ./py.exe
Can't find a default Python.以下内容也不起作用:
$ wine python34.exe
wine: cannot find L"C:\\windows\\system32\\python34.exe"编辑:正如评论中的@laszlowaty建议的那样,我在python34中安装了python34 (64位),并将python34文件夹复制到c_disk葡萄酒中,但它不起作用:
$ wine ./python.exe
err:module:import_dll Library python34.dll (which is needed by L"C:\\Python34\\python.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"C:\\Python34\\python.exe" failed, status c0000135我在Windows中找不到python34.dll。
编辑:我不得不重新安装我的Debian稳定64位Linux发行版。在此之后,我再次尝试,这次python-3.4.0.msi安装得非常好。谢谢大家的帮助。
发布于 2019-04-12 08:30:08
在葡萄酒上安装python是非常有意义的。-跨平台开发--开发葡萄酒下使用的脚本(在窗口和葡萄酒之间存在需要嵌入的差异,例如在注册表中)--我们使用红酒来替换一些窗口框,因为在许多情况下它更快。
如果您创建了在Windows上运行álso的多处理多平台代码,我强烈建议在windows/wine上进行测试,因为Windows是最有限的操作系统(我指的是: Windows上没有分叉,windows上没有信号,函数和类必须是可选择的才能生成新进程,等等)。)
现在,我开发的大多数程序都是在Windows上开发的,并在Linux / Osx上并行测试(因为通常情况下,它们最有可能运行)
我在这里做了一个构建示例,它包含bash脚本,用于在您的Ubuntu机器上自动安装葡萄酒和Python:
发布于 2020-03-26 20:31:23
我在3.4和3.5中使用了这个指南。下面是你需要做的事情:
#1 Use Wine 2.4
apt install add-apt-repository
add-apt-repository ppa:wine/wine-builds
apt install --install-recommends winehq-devel
#2 Use winetricks (a newer one that what is available in the repo)
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
./winetricks -q win10
./winetricks vcrun2015
#3 run the installer
wine python-3.4.4.exe来源:Solution-2288-articles
发布于 2018-02-13 09:57:16
这样做太糟糕了。Python编译为portable,这意味着您只需为debian安装Python (实际上debian附带了python,但您可以安装更多版本的python)。
如果您有特定的理由使用windows版本,那么wine并不是一种方法。更好(也更容易)的方法是使用VirtualBox并模拟整个窗口。我甚至不确定是否可以完全使用葡萄酒来运行python。
编辑:你能去你的C驱动器葡萄酒,并找到你的python.exe文件在哪里?
https://stackoverflow.com/questions/48763750
复制相似问题