2012-08-30 66 views
2

可移植Python和Movable Python允许在不安装任何东西的情况下编程python,只需解压缩一些东西即可。 :-)如何在便携式Python和可移动Python中安装pyInstaller

我也希望能够从我的脚本创建独立的可执行文件,螺母我不能将pyInstaller绑定到这些包,因为pyInstaller需要pyWin32,但pyWin32依赖于python注册表签名,而且我有不是他们,因为我使用的是可移植版本的python! 任何解决方法?通过解压pywin32可执行文件(pywin32-217.win32-py2.7.exe),我得到两个文件夹PLATLIB和SCRIPTS;也许只是将这些文件夹移动到正确的Python Portable子文件夹就足够了?

我使用:

  • 的Windows XP
  • PortablePython_2.7.3.1(便携式的Python)
  • movpy-2.0.0-py2.5.1(可移动的Python)
  • pyinstaller- pyinstaller-v2.0-107-gecb2882(pyInstaller)
  • pywin32-217.win32-py2.7(PyWin32)

回答

3

显然它可以通过改变进口顺序来修复。从pyinstaller site

In order to make pywin32 works with portable python pywintypes must be loaded before 
any win32 library ....... Swapping the two lines "import win32api" and "import 
pywintypes" in bindepend.py (line 44 and 45 on commit 0837e8a....) fixes the issue. 

它固定了同样的问题对我来说。