Hello! I'm trying to write a package but when I ru...
# package-authoring
s
Hello! I'm trying to write a package but when I run
make build install
the script fails when trying to generate the python sdk. After running each command separately, The error comes from this line
Copy code
python3 setup.py build sdist
and the error is
Copy code
Traceback (most recent call last):                                                                                                                                                              File "/mnt/c/Data/GenezioIac/pulumi-genezio/sdk/python/bin/setup.py", line 6, in <module>                                                                                                       from setuptools import setup, find_packages                                                                                                                                               ModuleNotFoundError: No module named 'setuptools'
Shouldn't the sdk generation handle the module installation? I'm using the template provided by this repository https://github.com/pulumi/pulumi-provider-boilerplate I'm using WSL Ubuntu 22.04 with python 3.10.12
b
No it's up to you to provide a Python environment which includes all packages to run targets from the contained Makefile. This can be achieved either by installing the required packages globally, what I would NOT (!!) recommend at all! Or by creating a Python virtual environment which contains those package. At best you would use the devcontainer definition located in the boilerplate repo. Issue here you are on WSL. In that case I'd use
podman
to host the devcontainer. There is a documentation for VSCode how to configure for
podman
. Or you use
devbox
to configure your Pulumi development environment.
s
understood, thank you for the response
b
I missed a "NOT" in my last answer, about installing packages globally. But I guess you anticipated it already.
s
yup, i know using python venvs is better