TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Looking at Python for commercial apps but there are problems with packaging

18 点作者 darreld超过 7 年前
I&#x27;m researching using Python for commercial desktop applications but deployment seems problematic. I&#x27;m trying to decide if I&#x27;m looking at the wrong technology?<p>I love the language and I can see how productive I would be in it but I really need to be able to produce clean .exe files to deliver, and I would like for the solution to be cross-platform. I will be using Python 3.6+ and wxpython. cx_Freeze doesn&#x27;t do single file exe&#x27;s. Pyinstaller doesn&#x27;t seem to play well with Python3 (maybe I&#x27;m doing it wrong). py2exe doesn&#x27;t work for me either.<p>I&#x27;m sure there are a lot of very smart people working on this so it must be a hard problem which I would certainly be willing to help with but I&#x27;m wondering if I&#x27;m picking the wrong technology.<p>Alternatively I would use JavaFX, which would be fine, just not quite as productive.

8 条评论

mnai超过 7 年前
Try GUI2Exe, it worked for me pretty well, and as GUI it didn&#x27;t require to learn all tools command line switches<p><a href="https:&#x2F;&#x2F;code.google.com&#x2F;archive&#x2F;p&#x2F;gui2exe&#x2F;" rel="nofollow">https:&#x2F;&#x2F;code.google.com&#x2F;archive&#x2F;p&#x2F;gui2exe&#x2F;</a> <a href="https:&#x2F;&#x2F;launchpad.net&#x2F;gui2exe" rel="nofollow">https:&#x2F;&#x2F;launchpad.net&#x2F;gui2exe</a><p>Another great product by Andrea Gavana
评论 #15123361 未加载
memracom超过 7 年前
You could take a look at a small project that I did a few years ago to create a portable CPython build for Linux. <a href="https:&#x2F;&#x2F;github.com&#x2F;wavetossed&#x2F;pybuild" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;wavetossed&#x2F;pybuild</a> The basic idea was to make a CPython binary that did not use any system libraries. Instead, all dynamic linking was to local files within the directory tree of the application. That way you could zip up (or tar up) a directory tree containing this portable Python, its binary libraries and any Python modules&#x2F;libraries that you needed. The result was a self=contained app that could be copied to any Linux server, unpacked and executed. No prerequisites on the server except a new enough Linux kernel because the Linux ABI changed at some point around 10 years ago or so.<p>By updating the build script in the Github repo, you could update this to a newer version of Python 3.<p>To make a Windows binary doing the same thing would require a reasonable amount of knowledge about object files, linking, and Windows DLLs. It might be easier to use the MINGW GCC compiler rather than Microsoft, so consider that possibility. First thing to do is to understand how the CPython binary on Windows works and loads DLLs before actually executing Python code. The key is to intercept this process so that you have total control over all object files and do not rely on anything else being preinstalled on the target system.
milesvp超过 7 年前
I think you named the ones I used a few years ago. cx_freeze and py2exe both had issues. I was using 2.7 at the time, and I managed to get something deployable that didn&#x27;t require installing system libs, but wasn&#x27;t a single file either.<p>Python is my goto language for fast development, but it&#x27;s always felt a little clunky in windows. You may also need to consider gui issues. we ended up using pyqt, and it didn&#x27;t quite feel like a windows app either.<p>You may want to consider, and I hate to say this, javascript for your language. The app we built had pdf libs we needed in python and not in javascript so a browser based solution wasn&#x27;t available to us at the time. But being able to host the app is generally considered the easiest way to get cross platform these days.
dagw超过 7 年前
There is also Briefcase, <a href="https:&#x2F;&#x2F;pybee.org&#x2F;project&#x2F;projects&#x2F;tools&#x2F;briefcase&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pybee.org&#x2F;project&#x2F;projects&#x2F;tools&#x2F;briefcase&#x2F;</a><p>But last time I looked at it it was very much a work in progress.
tyingq超过 7 年前
Pyinstaller mentions that one of the maintainers does paid support. You mentioned it was commercial software, so perhaps just paying an expert to get things going makes sense.
bonhardcomp超过 7 年前
The outlook is much better in 2017 than it was just a few years ago. Another +1 for PyQt. I wanted a native Mac look and you can get get pretty darn close with Qt. I&#x27;ve also used PyInstaller, which is superbly well documented.
testino超过 7 年前
Py2exe with python 2.7 is ised for rcam-pro <a href="http:&#x2F;&#x2F;www.vintech.bg" rel="nofollow">http:&#x2F;&#x2F;www.vintech.bg</a>
Petrakis超过 7 年前
I think you should check Visual Studio with C# and .NET<p>Thats what I would use (If target machines are windows)<p>I still havent tried Net core on Unix machines so I cant say much.<p>If you pack it into exe you lose the cross-platform thing, so you might aswell use any other language.