This topic was automatically generated from Slack. You can find the original thread here.
How can I resolve this error about conflicting dependencies? My workflow has two Python steps that use the same libraries and imports them the same way:
# pipedream add-package netsuite
from netsuite import NetSuite, Config, TokenAuth
import os
import asyncio
It sounds like you’re seeing an error about conflicting dependencies in your Pipedream workflow, where you have two Python steps that both use the same libraries (like netsuite) and import them the same way. Here’s what you need to know and how to resolve it: ### Why This Happens - Pipedream installs Python packages per step. Each Python code step manages its own environment and dependencies. - If two steps require different versions of the same package, or if there’s a version conflict between steps, you may see a “conflicting dependencies” error. - Even if you import the same library the same way in both steps, if you use # pipedream add-package netsuite in both, Pipedream tries to install the package for each step, and version mismatches or dependency trees can cause conflicts. ### How to Fix #### 1. Use the Same Version in All Steps If you specify a version, always use the same one in every step: ```
pipedream add-package netsuite==1.2.3 from netsuite import NetSuite, Config, TokenAuth
``` Do this in every step that needs netsuite. #### 2. Remove Duplicate Package Installs If possible, try to consolidate your code so that only one step needs to import and use the package, then pass the result to the next step using Pipedream’s steps object. #### 3. Check for Transitive Dependencies If your steps use other packages that depend on different versions of the same library, try to align those versions, or avoid using conflicting packages in the same workflow. #### 4. Rebuild the Workflow Sometimes, deleting and recreating the steps after aligning package versions can clear up cached dependency issues. #### 5. Contact Support if Needed If you’ve tried the above and still get errors, there may be a deeper issue with the package or Pipedream’s resolver. You can reach out at Pipedream. — Summary: - Always specify the same version of a package in every Python step. - Try to minimize the number of steps that require the same package. - Align all dependencies to avoid conflicts. If you share the exact error message, I can provide more targeted advice!