Home > Software design >  Is it possible to run python scripts without python installed in Linux?
Is it possible to run python scripts without python installed in Linux?

Time:05-05

I once did something similar under windows, copying the whole python and specifying PYTHONPATH by a .bat script to make it work locally.

But today I got a Linux server that has a strict working environment and won't allow me to install anything. And unfortunately I know little about Linux. I wonder is there a similar way that I can run python on the server?

CodePudding user response:

Yes, you can use python docker images for running python scripts.

CodePudding user response:

I've built stand alone executables using pyinstaller. It works well. I've only used it to deliver into Linux so far.

CodePudding user response:

Sorry, I cannot put a comment because of my low reputation.

In short, you cannot run a Python script directly without the interpreter installed. Fortunately, you can install a Python environment without root permission by using Miniconda (or Anaconda), then make a virtual environment and install the required packages to run your code locally for your use only.

  • Related