Replit installs plaid when working with plaid-python

Problem description:
The Plaid API’s python client library is named plaid-python in pypi. However, the package is referred to as plaid in python code, e.g. import plaid. See here. As a result, if a repl uses the plaid-python package, Replit attempts to install the (totally unrelated) python package plaid when the repl’s code is run.

Expected behavior:
Run code without installing the plaid package. Provide an option to raise an error if the code calls for a package that is not installed instead of automatically attempting a new install.

Actual behavior:
Replit installs the plaid package with python3 -m poetry add plaid. The code fails with the following error message:

Traceback (most recent call last):
  File "main.py", line 8, in <module>
    configuration = plaid.Configuration(
AttributeError: module 'plaid' has no attribute 'Configuration'. Did you mean: 'configuration'?

Steps to reproduce:

  1. Create new repl using the Python template.
  2. Add plaid-python as a package dependency.
  3. In main.py, put the following code and hit Run:
import plaid
from plaid.api import plaid_api

# Available environments are
# 'Production'
# 'Development'
# 'Sandbox'
configuration = plaid.Configuration(
    host=plaid.Environment.Sandbox,
    api_key={
        'clientId': client_id,
        'secret': secret,
    }
)

api_client = plaid.ApiClient(configuration)
client = plaid_api.PlaidApi(api_client)

Bug appears at this link:
– removed join link, only post repl link –

Browser/OS/Device:
Chrome/MacOS Ventura/Macbook

hey there, try doing this:

  1. uninstall plaid
    — go to package manger and press - on plaid or go to shell and enter pip uninstall plaid -y
  2. press the three dots
  3. press the show hidden files button
  4. press the .replit file
  5. go to line 90, or guessImports = true
  6. enter instead guessImports = false
  7. install plaid-python
    — go to shell and enter pip install plaid-python or poetry add plaid-python or go to the packages manager and enter plaid-python and press the + icon
1 Like

Welcome to the community, e-gons :wave: ! @bigminiboss :sunglasses:

1 Like

dang, the usual welcoming of course XD