Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Tips on pex

Steps to Build a pex Environment File

  1. Start a Python Docker image with the right version of Python interpreter installed. For example,

    docker run -it -v $(pwd):/workdir python:3.5-buster /bin/bash
    
  2. Install pex.

    pip3 install pex
    
  3. Build a pex environment file.

    pex --python=python3 -v pyspark findspark -o …

Managing Virtual Environments in Poetry

Where to Create Virtual Environments

By default, Poetry create virtual environment in $HOME/.poetry for cahcing/sharing purpose. However, it is inconvenient if you use Docker-based web IDE for a Python project as you will lose the created virtual environment once the Docker container is restarted. In that situation, you …