Skip to content

Setup bpy on Linux

Alexander Ritter edited this page Jun 15, 2022 · 1 revision

The instructions are for Ubuntu, but the commands can be adapted for other distributions. You may only need to change the package manager in the first step.

  1. Download venv-blender-linux.zip from Dropbox (I precompiled bpy so you don't have to do it) and unzip it to create a folder .venv-blender.
    The resulting file tree should look like that:
    grafik

  2. Install required python libaries:

    sudo apt install python3.10-venv
    sudo apt-get install python3-tk
  3. Create and activate a virtual environment (make sure you are in the working directory blender_render)

    python3 -m venv .venv-blender
    source .venv-blender/bin/activate
  4. Install the required dependencies.
    Make sure that the virtual env is activated by checking if the console prefix is .venv-blender:
    grafik

    pip install -r requirements.txt
    
  5. You can now run and compile the project. Please follow the steps in Compilation.
    Keep in mind, always activate the virtual environment using .venv-blender\Scripts\activate.bat before running any script, otherwise bpy imports won't work.