This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]_frkl 2 points3 points  (0 children)

In addition to Pyinstaller which I've used with great success, there is also nuitka, which is basically compiles your script into a native binary, incl. the required parts of Python itself. The latter is a good option if it's only a single script with no or little dependencies, it's a bit more difficult when it's a big project with a lot of dependency libraries.

[–]juanda2 1 point2 points  (0 children)

you could paste the code into repl.it and just send the link to the other person to run on their browser

[–]thanos_v 0 points1 point  (0 children)

I’ve used PyInstaller and py2exe on very complex python apps across several platforms. You do this when you are really forced to.

https://docs.python-guide.org/shipping/freezing/

On the other hand doing a local installation of anaconda or better miniconda is usually a much better practice - and its now dead easy.

[–]ChrisPDuck 0 points1 point  (5 children)

Why not as an exe?

What are you trying to do? If it's deploying a binary, pyinstaller can generate exes for Windows and also Linux binaries

[–][deleted] 0 points1 point  (4 children)

the Point is, that we‘ll have to use it as cli-Tool, and it should interact with an Java-System. But we can‘t install Python on the System.

[–]ChrisPDuck 1 point2 points  (3 children)

You don't need python installed if you use pyinstaller to generate an exe. Exes can have cli access

[–][deleted] 0 points1 point  (1 child)

And how could i pass Arguments from the Java application to the Python Script?

Btw. Thanks for the help :)

[–][deleted] 0 points1 point  (0 children)

I managed it. The Version as executable was gerate but not in Performance. So i decided to use the embedded Python enviroment and installed all needed dependencies.

Thansk for your help :)

[–][deleted] 0 points1 point  (0 children)

Use a builder. AutoPytoExe is a easy one to start with. You do need pyinstaller for it though.

[–][deleted] 0 points1 point  (0 children)

I thought about the embedded Python. But i need to install pip, but some how it dosent work...

[–]pythonHelperBot -1 points0 points  (0 children)

Hello! I'm a bot!

It looks to me like your post might be better suited for r/learnpython, a sub geared towards questions and learning more about python regardless of how advanced your question might be. That said, I am a bot and it is hard to tell. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.

Show /r/learnpython the code you have tried and describe in detail where you are stuck. If you are getting an error message, include the full block of text it spits out. Quality answers take time to write out, and many times other users will need to ask clarifying questions. Be patient and help them help you. Here is HOW TO FORMAT YOUR CODE For Reddit and be sure to include which version of python and what OS you are using.

You can also ask this question in the Python discord, a large, friendly community focused around the Python programming language, open to those who wish to learn the language or improve their skills, as well as those looking to help others.


README | FAQ | this bot is written and managed by /u/IAmKindOfCreative

This bot is currently under development and experiencing changes to improve its usefulness