我已经安装了64位Debian Stable 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(也支持xpwindows)。我试过了:
^{pr2}$但出现以下错误:
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"
我怎样才能解决这个问题?谢谢你的帮助。在
编辑:这显然不是安装pythonforwindows的理想方法,但它非常方便,因为可以在Linux下开发和测试应用程序,然后使用wine中的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在评论中的建议,我在Windows中安装了python34(64位),并将python34文件夹复制到wine c_磁盘,但它不起作用:
$ 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安装得非常好。谢谢大家的帮助。在
在葡萄酒上安装python非常有意义。 -跨平台开发 -wine下使用的脚本的开发(windows和wine之间的差异需要解决,例如在注册表中) -我们用酒来代替一些窗户的盒子,因为在很多情况下它更快
如果你创建的多处理多平台代码也应该在Windows上运行,我强烈建议在Windows/wine上测试,因为Windows是最有限的操作系统(我说的是:在Windows上没有分叉,在Windows上没有信号,函数和类必须是可选择的,以产生一个新的进程,等等…)在
现在我开发的大多数程序都是在Windows上开发的,并在Linux/Osx上进行并行测试(因为通常在那里它们很可能会运行)
我在这里做了一个构建示例,它包含bash脚本,可以自动在Ubuntu机器上安装Wine和Python:
https://github.com/bitranox/install_python_on_wine_and_travis
这是个糟糕的方法。Python构建为
portable
,这意味着您只需为debian安装Python(实际上debian附带了Python,但是您可以安装更多版本的Python)。在如果您有使用windows版本的特定原因,
wine
不是一个好办法。更好(更简单)的方法是使用VirtualBox
并模拟整个窗口。我甚至不确定是否可以使用wine完全运行python。在编辑:你能去你的酒驾找到你的酒在哪里吗python.exe文件?在
相关问题 更多 >
编程相关推荐