Importing Pycom Libraries
-
Hello,
I am having some issues importing the library for the pytracker.
I know that its probably something stupid simple, but I have not been able to figure out what I am doing wrong.
I downloaded all of the libraries from the github and I have tried structuring them like this:

and I get the following error when importing pytrack [picture for exact code]

ImportError: no module called 'pycoproc.Pycoproc'This also persists if I mode pycoproc.py out into the main lib directory, which I thought could also be the problem based on how the modules were structured in the github repo.
What am I doing wrong?
-
@MichaelWojcik Yes, the convention is to have all library files in the
lib/directory, no subdirectories. Or at least that's how it's worked out for me.Regarding your issue, I believe it stems from you doing
import pycoproc.Pycoproc, when you should really be doingfrom pycoproc import Pycoproc
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login