title: Setting up Python Virtual Env Initiating Jupyter Notebook gaierror: [Errno -2] Name or service not known
body: <p>When I try to Initiate Jupyter notebook in the virtual env, I get the following error - .gaierror: [Errno -2] Name or service not known</p>
  
  <p>Virtual Env -wget <a href="https://pypi.python.org/packages/source/v/virtualenv/virtualenv-12.0.7.tar.gz" rel="nofollow noreferrer">https://pypi.python.org/packages/source/v/virtualenv/virtualenv-12.0.7.tar.gz</a></p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/vraja/pyspark/bin/jupyter-notebook", line 11, in &lt;module&gt;
      sys.exit(main())
    File "/home/vraja/pyspark/lib/python2.7/site- 
      packages/jupyter_core/application.py", line 266, in launch_instance
      return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
    File "/home/vraja/pyspark/lib/python2.7/site- 
     packages/traitlets/config/application.py", line 657, in launch_instance
      app.initialize(argv)
    File "&lt;decorator-gen-7&gt;", line 2, in initialize
    File "/home/vraja/pyspark/lib/python2.7/site- 
    packages/traitlets/config/application.py", line 87, in catch_config_error
      return method(app, *args, **kwargs)
    File "/home/vraja/pyspark/lib/python2.7/site- 
    packages/notebook/notebookapp.py", line 1629, in initialize
      self.init_webapp()
    File "/home/vraja/pyspark/lib/python2.7/site- 
    packages/notebook/notebookapp.py", line 1379, in init_webapp
      self.jinja_environment_options,
    File "/home/vraja/pyspark/lib/python2.7/site- 
    packages/notebook/notebookapp.py", line 158, in __init__
      default_url, settings_overrides, jinja_env_options)
    File "/home/vraja/pyspark/lib/python2.7/site- 
    packages/notebook/notebookapp.py", line 251, in init_settings
      allow_remote_access=jupyter_app.allow_remote_access,
    File "/home/vraja/pyspark/lib/python2.7/site- 
    packages/traitlets/traitlets.py", line 556, in __get__
      return self.get(obj, cls)
    File "/home/vraja/pyspark/lib/python2.7/site- 
    packages/traitlets/traitlets.py", line 535, in get
      value = self._validate(obj, dynamic_default())
    File "/home/vraja/pyspark/lib/python2.7/site- 
    packages/notebook/notebookapp.py", line 872, in _default_allow_remote
       for info in socket.getaddrinfo(self.ip, self.port, 0, 
       socket.SOCK_STREAM):
       socket.gaierror: [Errno -2] Name or service not known
  (pyspark)-sh-4.1$
  </code></pre>