Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot import: "from trello import TrelloClient" py-trello and trello packages (replit)

To be simple, I couldn't import py-trello bcs there is also a package named trello. when I run

from trello import TrelloClient

replit thinks that I'm working on python trello package and installs trello package. And then my code gives error like "cannot import TrelloClient". But actually I'm trying to work on py-trello

I tried to add a requirements.txt file to my workspace but when I run the main.py file it automatically downloads the trello package. How can I import py-trello package instead of trello package? It works perfectly fine on my local workspace because I only have py-trello. So it's importing py-trello. But the automatic download system of replit does not let me import py-trello. What should I do?

like image 542
mustafa yavuz Avatar asked Dec 06 '25 03:12

mustafa yavuz


1 Answers

import trello #upm package(py-trello)

When you add a package by importing, we attempt to guess what package you want based on the modules you are importing. In most languages this is a direct correspondence, but in Python sometimes we can get it wrong. You can directly request a package by specifying the package directly on the import line.

Read in documentation

like image 64
unbe_ing Avatar answered Dec 09 '25 16:12

unbe_ing



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!