Skip to content


Seems a is needed in src/ directory? #105

radaiming opened this Issue · 3 comments

2 participants


According to the python doc, there seems should be a file in src/ directory. Before I touch a blank I got the error:

$ ./you-get
Traceback (most recent call last):
File "./you-get", line 3, in
from src.you_get import main
ImportError: No module named src.you_get


Interesting. in my Python 3.3.0, it is allowed not having a in src/
however, src should not be considered as a package. the most-top-level namespace is you_get. I will change that soon.


#!/usr/bin/env python3

import os, sys
sys.path.insert(0, os.path.join((os.path.dirname(os.path.abspath(__file__))), "src"))

from you_get import *

if __name__ == "__main__":
@soimort soimort added a commit that closed this issue
@soimort restructure package, fix #105 106c85e
@soimort soimort closed this in 106c85e

My python3 version is 3.2.3


I suggest using os.path.realpath(file) instead of os.path.abspath(file), I usually use a symbolic link in /usr/local/bin to point to you-get, if use os.path.abspath(file), I'll got /usr/local/bin/src in sys.path. I checked, the realpath() will always call abspath() to get absolute path before returning the real path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.