Could not find a version that satisfies the requirement

This approach (having all dependencies in a directory and not downloading from an index) only works when the directory contains all packages. The directory should therefore contain all dependencies but also all packages that those dependencies depend on (e.g., six, pytz etc). You should therefore manually include these in requirements.txt (so that the first step downloads them explicitly) or you … Read more

Exit codes in Python

You’re looking for calls to sys.exit() in the script. The argument to that method is returned to the environment as the exit code. It’s fairly likely that the script is never calling the exit method, and that 0 is the default exit code.

Removing pip’s cache?

If using pip 6.0 or newer, try adding the –no-cache-dir option (source). If using pip older than pip 6.0, upgrade it with pip install -U pip.

List files ONLY in the current directory

Just use os.listdir and os.path.isfile instead of os.walk. Example: But be careful while applying this to other directory, like which would not work because f is not a full path but relative to the current dir. Therefore, for filtering on another directory, do os.path.isfile(os.path.join(somedir, f)) (Thanks Causality for the hint)