Skip to content

🧪

Python3-Portable

This instruction (especially step 4) is strange to say not easiliy found – as should be – on the web in combination with the presented portable build which are up-to-date and used by myself. Following steps are critical for my setup to work:

  1. Download one of many cpython3-portable-builds
  2. Extract zst-archive by unzstd ZST-FILE. You get a tar-file.
  3. Extract tar-file by tar -xf TAR-FILE. You get a folder named python.
  4. Move to python/install/lib/python3.x/ (depending on your choice of Python-version), open site.py and change following two variables:

    python/install/lib/python3.12/site.py
    ENABLE_USER_SITE = True
    USER_SITE = ''
    

    Now the site-packages of your portable Python3 won't conflict with the site-packages of the OS anymore.

  5. To install new Python-packages move to python/install/bin/ and run following Terminal-Command:

    Terminal (python/install/bin/)
    ./pip3 install PACKAGE