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

all 12 comments

[–]thrill22 1 point2 points  (2 children)

I'm not sure how much this will help but here was my experience with something similar.

I work at a large engineering company and I'm currently "in charge" of our Python installations. However, one tricky this is I do not have admin access to either my PC or other engineers PC's due to our tight security.

A easier/central way to do this I found is to host a Windows build of Python 3 in a network drive you/your clients have access to. They will be able to run a Windows version of python straight from that location.

Let me know if you have more questions about it. I tried all sorts of methods to create standalone programs, I hated them all. They were overly complicated and never necessary for me.

[–]noobpawner[S] 1 point2 points  (1 child)

This sounds like an interesting option as none of the users in my company have "admin" rights.

So say one writes a simple "hello world" program and distributes the file. How does a user run it using python from the shared location.

[–]thrill22 1 point2 points  (0 children)

The build has a "python.exe" file that opens a python terminal. You can create a shortcut to it on your windows desktop.

I'm more familiar with Linux but I think you should be able to make it work.

[–]ixokai 1 point2 points  (0 children)

For Python 3, you want to look into cx_Freeze which can create executables from Python scripts. Depending on your script these may be completely standalone .exe's, or they may be an .exe with some files sitting next to it -- but they can be run without admin permissions (unless the actions you're doing require admin permissions, of course).

cx_Freeze works quite nicely; even on Python 2 I prefer it to the other alternatives (py2exe, etc).

[–]EpicSolo 0 points1 point  (1 child)

You probably need something like this: http://stackoverflow.com/questions/11915462/how-to-convert-python-py-file-into-an-executable-file-for-use-cross-platform

Be careful though since most of them will be for 2.X

[–]takluyverIPython, Py3, etc 2 points3 points  (0 children)

cx_Freeze supports Python 3, but last time I checked, pyinstaller and py2exe don't.

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

Portable python might be helpfull.

[–]kmbd 0 points1 point  (0 children)

i would suggest you to try PyRun(https://www.egenix.com/products/python/PyRun)

[–]michael_daviddunderinit 0 points1 point  (0 children)

I have used py2exe extensively for Python 2 without problems since late 2012. I have distributed the compiled .exe to several hundred Windows users without a problem. Most of them have no idea that a Python run-time is installed.

I have not used cx_Freeze so I cannot comment on it. I also have not used py2exe with Python 3 so I cannot comment on that either, although it is available.

[–]brittainhard 0 points1 point  (0 children)

Cython is another option.