Welcome to the Linux Foundation Forum!

Lab 2.1 Development Environment set up


I am finding a lot of problems setting upt hte environment because the files are obsoleted. The last that I founs and I can´t solve is with : ./network.sh up createChannel -ca -s couchdb
This is the error:
from distutils.spawn import find_executable
ModuleNotFoundError: No module named 'distutils'
Can someone help me? Is there another tutorial that I can follow to set up the environment?


  • Bobbijn
    Bobbijn Posts: 192
    edited May 8

    Hello @Tisa
    Let's see if we can get to the bottom of this issue. It seems like you're encountering issues because distutils is not installed. This module is required by the Hyperledger Fabric sample scripts. Here's some suggestions to resolve this issue:
    1. Install distutils:
    If you're using Ubuntu, you can install distutils by running: sudo apt-get install python3-distutils

    1. Ensure You Have Python Installed:
      Make sure you have Python 3 installed: python3 --version

    2. Re-run the Network Script: ./network.sh up createChannel -ca -s couchdb

    Here are some additional resources, Fabric Development Environment Setup Guide for the latest best practices.

    Please keep me posted on your progress, Bobbi

  • tisa
    tisa Posts: 2

    Hi Bobbijn,

    I tried to run sudo apt-get install python3-distutils and got:

    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Package python3-distutils is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package 'python3-distutils' has no installation candidate

  • Bobbijn
    Bobbijn Posts: 192
    edited May 15

    Hello @Tisa,

    It looks like the package python3-distutils is not directly available in your package manager, which can happen depending on the version of Ubuntu you're using or your system's package sources. Here are a few alternative steps you can take to resolve the issue:

    1. Alternative Package Installation:
      On some versions of Ubuntu,** python3-distutils** is included in the python3-lib2to3 package. You can try installing it by running:
      Copy code
      sudo apt-get update
      sudo apt-get install python3-lib2to3

    If that doesn’t work, another method is to ensure that you have the universe repository enabled, which contains additional packages not included in the main repository:
    Copy code
    sudo add-apt-repository universe
    sudo apt-get update
    sudo apt-get install python3-distutils

    1. Verify Python Installation:
      Double-check which version of Python 3 is installed:
      Copy code
      python3 --version

    Ensure that it’s Python 3.6 or newer, as older versions might not support all features needed for Hyperledger Fabric.

    1. Re-run the Network Script:
      After setting up the environment, try to run the network script again:
      Copy code
      ./network.sh up createChannel -ca -s couchdb

    If you continue to have issues, it might be helpful to consult the official Hyperledger Fabric documentation (https://hyperledger-fabric.readthedocs.io/) for updated instructions on setting up the development environment.
    Hope This Helps, Bobbi


Upcoming Training