Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Dates and Times The Birthday App Display the age

Tomas Skacel
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tomas Skacel
Python Development Techdegree Graduate 9,172 Points

Unresolved references when importing relativedelta

Hi! This is the first time I'm using PyCharm CE and I've come across something I wanted to ask about. When I use from dateutil import relativedelta I get a "Unresolved reference 'dateutil'" problem (red exclamation mark in problems). I also get a "Unresolved reference 'relativedelta'". These problems do not come up in the video.

The code runs fine in the virtual environment. Is this problem showing up because I do not have dateutil installed globally? Is this just something I should ignore, or is there a way to resolve this?

Thanks!

1 Answer

Travis Alstrand
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Travis Alstrand
Treehouse Teacher

(This was solved via Slack)

For anyone else that comes across a similar issue, it appears to have been a mix up within PyCharm regarding the interpreter. Tomas Skacel deleted his virtual environment, reset the Python Interpreter to the one in the venv and re-installed the dateutil package and things started working after that.

You access the interpreter settings in PyCharm via

File > Settings > Project: <Your Project> > Python Interpreter