'import sitecustomize' fails when opening spyder with non-empty file
<p>I get the error message 
<code>'import sitecustomize' failed; use -v for traceback</code> in the internal python console in Spyder.  </p>

<p>The interesting thing is, this only happens inside Spyder, running python in a shell doesn't show the same behaviour.</p>

<p>Furthermore, when I do </p>

<pre><code>spyder --reset
</code></pre>

<p>It all works until I close Spyder during having any python file open in Spyder. After restart, the error message is shown again.</p>

<p>I saw the answer to <a href="http://stackoverflow.com/questions/17258634/import-sitecustomize-failed-upon-starting-spyder">&#39;import sitecustomize&#39; failed upon starting spyder</a>. 
I am on Ubuntu 16.04 with Python 2.7.12 (64bit) and Spyder version 2.3.8 and not running a firewall, so this answer most probably doesn't fit to my case. Furthermore, setting the <code>DEBUG_SPYDER</code> variable to <code>True</code>, shows no errors related to this failed import.</p>

<p>I found the problem to be special characters in the path name of the current working-directory. Changing working-directories to a path without special characters before exiting spyder resolved the problem.</p>

python spyder