code: def check_path():
      
      dirname = osp.abspath(osp.join(osp.dirname(__file__), osp.pardir))
      if dirname not in sys.path:
          show_warning("Spyder must be installed properly "
                       "(e.g. from source: 'python setup.py install'),\n"
                       "or directory '%s' must be in PYTHONPATH "
                       "environment variable." % dirname)
docs: Check sys.path: is Spyder properly installed?