title: 'import sitecustomize' failed upon starting spyder
body: <p>I am trying to install python. Or actually, have installed and deinstalled it a few times now. I am using pythonxy with the spyder IDE (i am used to matlab is why i want to use spyder). The 3.3.2 python would not even start with spyder on my win8 machine, so now I have the 2.7 version installed. </p>
  
  <p>Spyder starts up now, but upon startup I get `'import sitecustomize' failed? in my console and python wont execute any commands I enter. After the error the startupscript keeps on going forever without doing anything and I cant do anything either anymore. The  error tells me to start python with -v appendix, output below.</p>
  
  <p>I have googled this error which gave me two possible solutions:
  i should edit python.rb
  <a href="https://github.com/mxcl/homebrew/commit/10ba101c323f98118b427f291e15abc5b3732991" rel="noreferrer">https://github.com/mxcl/homebrew/commit/10ba101c323f98118b427f291e15abc5b3732991</a>
  or i should apply this (attachment in last post there) to sitecustomize
  <a href="https://code.google.com/p/spyderlib/issues/detail?id=771" rel="noreferrer">https://code.google.com/p/spyderlib/issues/detail?id=771</a></p>
  
  <p>Applying the diff file did not help and as mata explains below the .rb file is used during install, so not applicable to my problem.</p>
  
  <p>So my question: Does anybody know how to fix this bug from experience?</p>
  
  <p>The error:</p>
  
  <pre class="lang-none prettyprint-override"><code>'import sitecustomize' failed; use -v for traceback
  Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
  Type "help", "copyright", "credits" or "license" for more information.
  </code></pre>
  
  <p>The traceback:</p>
  
  <pre class="lang-none prettyprint-override"><code>C:\Python27\lib\site-packages\spyderlib\pil_patch.pyc matches C:\Python27\lib\site-packages\spyderlib\pil_patch.py
  
  import spyderlib.pil_patch # precompiled from C:\Python27\lib\site-packages\spyderlib\pil_patch.pyc
  
  Traceback (most recent call last):
  
    File "C:\Python27\lib\site.py", line 498, in execsitecustomize
      import sitecustomize
  
    File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 174, in &lt;module&gt;
  
      os.environ["SPYDER_AR_STATE"].lower() == "true")
    File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\monitor.py", line 146, in __init__
  
      self.n_request.connect( (host, notification_port) )
    File "C:\Python27\lib\socket.py", line 224, in meth
  
      return getattr(self._sock,name)(*args)
  
  socket.error: [Errno 10061] No connection could be made because the target machine actively refused it
  
  Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
  Type "help", "copyright", "credits" or "license" for more information.
  </code></pre>