Can I Import xlswriter in Python If pip3 Installation Fails and ModuleNotFoundError Occurs?

This topic was automatically generated from Slack. You can find the original thread here.

in python can I import xlswriter since I can’t do a pip3 install xlswriter? import xlswriter fails at run as ModuleNotFoundError: No module named 'xlswriter'

Based on the information provided in the Pipedream documentation, some Python packages may not work within the Pipedream environment due to the requirement of binaries that are either not present or not compatible with the Pipedream workflow environment. Unfortunately, xlswriter seems to fall into this category, as indicated by the ModuleNotFoundError you’re encountering. This error typically means that the package is not installed or available in the environment your code is running in. For packages that cannot be imported directly due to these limitations, Pipedream suggests opening an issue if you encounter problems importing a PyPI package into a Python code step. You can do so by visiting Sign in to GitHub · GitHub. As an alternative, you might consider using other methods to work with Excel files that do not require xlswriter, or explore if there are any compatible packages available within the Pipedream Python environment that meet your needs.

: Try adding the package using a magic comment:

# pipedream add-package XlsxWriter

If it works, then import xlswriter won’t fail anymore.

that did it. I had tried this already but left the 2nd X out of the package…. :man-shrugging: