# Looking for help with using directories as python packages in the Social Inheritance Project in the Data Science Course

**URL:** <https://legacy-community.ine.com/t/looking-for-help-with-using-directories-as-python-packages-in-the-social-inheritance-project-in-the-data-science-course/1139>\
**Category:** Python Data Scientist Learning Path\
**Tags:** data-science\
**Created:** [September 30, 2021, 1:48pm UTC](https://legacy-community.ine.com/t/looking-for-help-with-using-directories-as-python-packages-in-the-social-inheritance-project-in-the-data-science-course/1139 "2021-09-30T13:48:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nkennedy1027-89c60c5](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@nkennedy1027-89c60c5](https://legacy-community.ine.com/u/nkennedy1027-89c60c5)\
**Post date:** [September 30, 2021, 1:48pm UTC](https://legacy-community.ine.com/t/looking-for-help-with-using-directories-as-python-packages-in-the-social-inheritance-project-in-the-data-science-course/1139/1 "2021-09-30T13:48:34Z")

</div>

I’m having trouble with the social network inheritance project located here: [INE](https://my.ine.com/DataScience/courses/26ad63e1/object-oriented-programming-with-python).

My tests pass, but when I try to run social-network/main.py, I get the following error:  
Traceback (most recent call last):  
File “main.py”, line 1, in  
from social\_network.accounts import User  
ModuleNotFoundError: No module named ‘social\_network’

My project can be found here: [https://github.com/nkennedy1027/data-science/tree/master/social-network-inheritance](https://github.com/nkennedy1027/data-science/tree/master/social-network-inheritance)

Any suggestions you have would be very helpful!

---

<div class="post-metadata">

**Author:** ![X0RW3LL](https://sea1.discourse-cdn.com/flex015/user_avatar/legacy-community.ine.com/x0rw3ll/32/190_2.png) [@X0RW3LL](https://legacy-community.ine.com/u/X0RW3LL)\
**Post date:** [October 4, 2021, 12:34am UTC](https://legacy-community.ine.com/t/looking-for-help-with-using-directories-as-python-packages-in-the-social-inheritance-project-in-the-data-science-course/1139/2 "2021-10-04T00:34:26Z")

</div>

You’re gonna wanna modify your imports on lines 1-2 to the following:

```auto
from accounts import User
from posts import TextPost, PicturePost, CheckInPost

```

Since you’re already inside the social\_network dir/module, you import accounts relatively, as opposed to absolutely. If your main.py file was one level up, it would then make sense to import in a hierarchical fashion.
