Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on Python Build Standalone

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

The GitHub repository python-portable has some example scripts for bundling standalone Python environments. It also releases standalone Python environemnts regularly.

Tips on Using env_python.tar.gz

This section is specifically on using the env_python.tar.gz environemnt released in the GitHub repository python-portable .

Update Shebang

  1. Start an IPython shell using the following code.

    ~/env_python/bin/python3 -m IPython
    
  2. Run the following code in the IPython shell to update Shebangs of Python scripts.

    dsutil.shebang.update_shebang("env_python/bin/", "/home/your_user_name/env_python/bin/python3")
    

Comments