Adrian,

I open Spyder, click on  ‘Consoles' and click on 'Open a Python console' and a 'Python 1’ console showing the following:
——————————————————————————————
Python 2.7.8 (default, Aug 15 2014, 13:43:01) 
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.61)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
—————————————————————————————

I then type 'import os' and get the following:
———————————————————————————
Python 2.7.8 (default, Aug 15 2014, 13:43:01) 
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.61)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> 
————————————————————————————————

With Global Working Directory unchecked (see attached .pdf) I run a file (test_python.py) and get:
——————————————————————————————
Python 2.7.8 (default, Aug 15 2014, 13:43:01) 
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.61)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> runfile('/Users/cbhe/scripts/test_python.py', wdir='/Users/cbhe/scripts')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'runfile' is not defined
>>> 
—————————————————————————————————

When I click on ‘Preferences' I get the following:
——————————————————————————————————
Spyder Internal Console

This console is used to report application
internal errors and to inspect Spyder
internals with the following commands:
  spy.app, spy.window, dir(spy)

Please don't use it to run your code

>>> Traceback (most recent call last):
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/spyder.py", line 2048, in edit_preferences
    widget = plugin.create_configwidget(dlg)
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/__init__.py", line 275, in create_configwidget
    configwidget.initialize()
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/configdialog.py", line 59, in initialize
    self.setup_page()
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/ipythonconsole.py", line 410, in setup_page
    sympy_present = programs.is_module_installed("sympy")
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/utils/programs.py", line 284, in is_module_installed
    actver = get_module_version(module_name)
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/utils/programs.py", line 230, in get_module_version
    mod = __import__(module_name)
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/sympy/__init__.py", line 37, in <module>
    from .core import *
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/sympy/core/__init__.py", line 8, in <module>
    from .expr import Expr, AtomicExpr
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/sympy/core/expr.py", line 7, in <module>
    from .evalf import EvalfMixin, pure_complex
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/sympy/core/evalf.py", line 9, in <module>
    import sympy.mpmath.libmp as libmp
AttributeError: 'module' object has no attribute ‘mpmath’
——————————————————————————————————————

When I click on Consoles and then click on Open an IPython cosole I get an IP Kernel and an Ipython Console 1/A showing respectively:
———————————————————————————————
Traceback (most recent call last):
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/widgets/externalshell/start_ipython_kernel.py", line 161, in <module>
    from IPython.kernel.zmq.kernelapp import IPKernelApp
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/IPython/__init__.py", line 48, in <module>
    from .core.application import Application
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/IPython/core/application.py", line 24, in <module>
    from IPython.core import release, crashhandler
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/IPython/core/crashhandler.py", line 28, in <module>
    from IPython.core import ultratb
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/IPython/core/ultratb.py", line 110, in <module>
    from IPython.core import debugger
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/IPython/core/debugger.py", line 59, in <module>
    from pdb import Pdb as OldPdb
  File "/Library/Python/2.7/site-packages/_pytest/pdb.py", line 6, in <module>
    import pytest
ImportError: No module named pytest


An error ocurred while starting the kernel
Traceback (most recent call last):
File "/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/spyderlib/widgets/externalshell/start_ipython_kernel.py", line 161, in 
from IPython.kernel.zmq.kernelapp import IPKernelApp
File "/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/IPython/__init__.py", line 48, in 
from .core.application import Application
File "/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/IPython/core/application.py", line 24, in 
from IPython.core import release, crashhandler
File "/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/IPython/core/crashhandler.py", line 28, in 
from IPython.core import ultratb
File "/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/IPython/core/ultratb.py", line 110, in 
from IPython.core import debugger
File "/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/IPython/core/debugger.py", line 59, in 
from pdb import Pdb as OldPdb
File "/Library/Python/2.7/site‑packages/_pytest/pdb.py", line 6, in 
import pytest
ImportError: No module named pytest
—————————————————————————————————

When I run spy.app, spy.window and dir(spy) from the Spyder Internal Console I get:
———————————————————————————————
spy.app
<spyderlib.utils.qthelpers.MacApplication object at 0x108457f28>

>>> spy.window
<spyderlib.spyder.MainWindow object at 0x1140538a0>

>>> dir(spy)
['app', 'versions', 'window']
——————————————————————————————

I really hope this helps.

Regards

Chris





On 16 Apr 2015, at 12:04 am, Adrian Klaver <[email protected]> wrote:

On 04/15/2015 03:34 AM, Chris wrote:
Adrian,

Sorry about the delayed response, I have been on the road.

So, I opened Spyder 2.3.3 again and went to Run/Configure and clicked on
Run. The attached .pdf of the Run window shows the detail. The result
was the appearance of a Python console. So far so good.

I then ran a test file (test_python.py) with the following response.

------------------------------------------------------------
Python 2.7.8 (default, Aug 15 2014, 13:43:01)
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.61)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> runfile('/Users/cbhe/scripts/test_python.py',
wdir='/Users/cbhe/scripts')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'runfile' is not defined
>>>
----------------------------------------------------------

So the problem is not that you cannot open a Console it is that a file will not run it.

So:

1) What happens if you do Consoles --> Open a Python console?

2) If it opens what happens if you do import os?

3) What happens if you Run the file, but leave the Working Directory unchecked?

4) Under Preferences --> Console --> Advanced Settings, what is the Python interpreter set to?


I then opened an IPython console which opened with the following (no
prompting from myself)

How did you open the IPython console?


----------------------------------------
An error ocurred while starting the kernel
Traceback (most recent call last):
File
"/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/spyderlib/widgets/externalshell/start_ipython_kernel.py",
line 161, in
from IPython.kernel.zmq.kernelapp import IPKernelApp
File
"/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/IPython/__init__.py",
line 48, in
from .core.application import Application
File
"/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/IPython/core/application.py",
line 24, in
from IPython.core import release, crashhandler
File
"/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/IPython/core/crashhandler.py",
line 28, in
from IPython.core import ultratb
File
"/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/IPython/core/ultratb.py",
line 110, in
from IPython.core import debugger
File
"/Applications/Spyder‑Py2.app/Contents/Resources/lib/python2.7/IPython/core/debugger.py",
line 59, in
from pdb import Pdb as OldPdb
File "/Library/Python/2.7/site‑packages/_pytest/pdb.py", line 6, in
import pytest
ImportError: No module named pytest
-------------------------------------------
Not sure what the above implies, except possibly that I have managed to
mangle the installation (I simply opened the .dmg file and clicked on
the Spyder icon) in some way.

Not sure why pytest is being called? Also it looks like it jumped from the Spyder app libraries to the system libraries. Will get to that problem later.

If this does not help in diagnosing my problem are you able to suggest
how I might go about deleting all the files associated with Spyder so I
can start again with a clean slate?

No, that has been done before to no effect. Lets work with what you have.







--
Adrian Klaver
[email protected]

--
You received this message because you are subscribed to a topic in the Google Groups "spyder" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/spyderlib/_-bFyvVgCic/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Attachment: Screen Shot 2015-04-19 at 7.46.28 pm.pdf
Description: Adobe PDF document

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Reply via email to