Hi, The "KeyError: 'SPYDER_ENCODING'" error is just a consequence of the real error which is happening in Spyder's sitecustomize.py. The sitecustomize module is executed by the Python interpreter before executing your own scripts (in your example, the executed script is Spyder's startup.py module in which IPython is executed).
To see the traceback associated with the "real error" mentioned above, you must add the '-v' option as the Python interpreter is warning you (see the first message which is printed out in console: "'import sitecustomize' failed; use -v for traceback"). You may do so within Spyder by doing the following: 1. create a new empty script 2. run it in a dedicated Python interpreter (i.e. with the F5 shortcut, with default run configuration settings): you should see the same error message: 'import sitecustomize' failed; use -v for traceback 3. now, edit the run configuration settings by pressing F6 4. add the option -v to the Python interpreter command line options 5. re-run the script by pressing F5: you should have a complete report including the traceback (note that there may be a lot of lines, so you may have to increase the Console maximum line count in Preferences > Console -- default value is 300, you may increase it up to 10000 for example --> this will be the new default value in next Spyder releases) HTH, Pierre On 5 mar, 23:42, Hugo Silva <[email protected]> wrote: > Dear all, > > I've just installed Spyder on a Mac OS X 10.6 with Python 2.7 and when > I start Spyder, on the IPython window I get the following: > > 'import sitecustomize' failed; use -v for traceback > Cannot read termcap database; > using dumb terminal settings. > Cannot read termcap database; > using dumb terminal settings. > Cannot read termcap database; > using dumb terminal settings. > Leopard libedit detected. > ------------------------------------------------------------ > Traceback (most recent call last): > File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ > python2.7/site-packages/spyderlib/widgets/externalshell/startup.py", > line 177, in <module> > __ipythonshell__.IP.stdin_encoding = os.environ['SPYDER_ENCODING'] > File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ > python2.7/UserDict.py", line 23, in __getitem__ > raise KeyError(key) > KeyError: 'SPYDER_ENCODING' > > I'd really like to start using Spyder since it really seem to be great > for Python development, however this problem is preventing me from > using it at all. > > Best regards, > Hugo Silva -- You received this message because you are subscribed to the Google Groups "spyder" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
