On 03/21/2015 11:58 PM, Chris Edwards wrote:
Adrian,
As requested:
Last login: Sun Mar 22 11:23:25 on console
Fl1cker:~ cbhe$ python --version
Python 2.7.6
Fl1cker:~ cbhe$ python2.6 --version
Python 2.6.9
Fl1cker:~ cbhe$ python2.7 --version
Python 2.7.6
Fl1cker:~ cbhe$ exit
logout
[Process completed]
In desperation I uninstalled Spyder from both Windows VMs and then
downloaded the latest applicable version of Python (2.7.9rc1) and
Spyder. See below:
Last login: Sun Mar 22 17:21:21 on ttys000
Fl1cker:~ cbhe$ echo $PATH
/Library/Frameworks/Python.framework/Versions/2.7/bin:
/Users/cbhe/scripts: /usr/local/bin: /usr/bin: /bin: /usr/sbin:
/sbin::/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Fl1cker:~ cbhe$ python --version
Python 2.7.9rc1
Fl1cker:~ cbhe$ python2.6 --version
Python 2.6.9
Fl1cker:~ cbhe$ python2.7 --version
Python 2.7.9rc1
Fl1cker:~ cbhe$ python
Sp python is pointing at the latest version.
Python 2.7.9rc1 (v2.7.9rc1:40eada278702, Nov 25 2014, 17:25:50)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import networkx as nx
>>> ^D
Here you should do:
>>> help(networkx)
to see where it is actually installed
So something like:
>>> import psycopg2
>>> help(psycopg2)
Help on package psycopg2:
NAME
psycopg2 - A Python driver for PostgreSQL
FILE
/usr/lib/python2.7/site-packages/psycopg2/__init__.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
While you are in the Python interpreter I would also do:
>>> import sys
>>> sys.path
This will show you the PYTHONPATH the system interpreter is seeing.
Fl1cker:~ cbhe$ exit
logout
[Process completed]
-----------------------------------------------------------------
Spyder 2.3.3
The Scientific PYthon Development EnviRonment
Python 2.7.8 64bits, Qt 4.8.6, PyQt4 (API v2) 4.11.1 on Darwin
---------------------------------------------------------------
There was no change in behaviour and I still can’t import NetworkX from
within Spyder. I have actually successfully executed a program using
NetworkX from the command line!
I think what I need to do is somehow make Spyder recognise Python 2.7.9
but feel I am in some sort of infinite loop here!
I gather from searching the web that I am not the first to have run into
problems with multiple versions of Python and wonder if his has been
addressed somewhere that I haven’t discovered.
Anyway thanks for the help so far.
Chris
--
Adrian Klaver
[email protected]
--
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.