$ python swc-installation-test-2.py
check virtual-shell... fail
…
- For instructings on installing a particular package,
- see the failure message for that package printed above.
+ check for command line shell (virtual-shell) failed:
+ command line shell (virtual-shell) requires at least one of the following dependencies
+ For instructions on installing an up-to-date version, see
+ http://software-carpentry.org/setup/
+ causes:
+ check for Bourne Again Shell (bash) failed:
+ could not find 'bash' executable for Bourne Again Shell (bash)
+ For instructions on installing an up-to-date version, see
+ http://software-carpentry.org/setup/
…
-follow the suggestions to try and install any missing software.
+follow the suggestions to try and install any missing software. For
+additional troubleshooting information, you can use the `--verbose`
+option:
+
+ $ python swc-installation-test-2.py --verbose
+ check virtual-shell... fail
+ …
+ ==================
+ System information
+ ==================
+ os.name : posix
+ …
Instructors
===========
if __name__ == '__main__':
+ import optparse as _optparse
+
+ parser = _optparse.OptionParser(usage='%prog [options] [check...]')
+ epilog = __doc__
+ parser.format_epilog = lambda formatter: '\n' + epilog
+ parser.add_option(
+ '-v', '--verbose', action='store_true',
+ help=('print additional information to help troubleshoot '
+ 'installation issues'))
+ options,args = parser.parse_args()
try:
- passed = check(_sys.argv[1:])
+ passed = check(args)
except InvalidCheck as e:
print("I don't know how to check for {0!r}".format(e.check))
print('I do know how to check for:')
print(' {0}'.format(key))
_sys.exit(1)
if not passed:
- print()
- print_system_info()
- print_suggestions(instructor_fallback=True)
+ if options.verbose:
+ print()
+ print_system_info()
+ print_suggestions(instructor_fallback=True)
_sys.exit(1)