Adrian, Below are my attempts to answer your questions.
Attempt to run Ipython from OS X command line ———————————————————————————— Last login: Tue Mar 24 20:52:47 on ttys000 Fl1cker:~ cbhe$ python --version Python 2.7.9rc1 Fl1cker:~ cbhe$ python 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 Fl1cker:~ cbhe$ Ipython -bash: Ipython: command not found Fl1cker:~ cbhe$ ipython -bash: ipython: command not found Fl1cker:~ cbhe$ exit logout [Process completed] ————————————————————————— So it appears that I can’t run IPython from the OS X command line and (as before) networkx can be imported by the system Python. Where is '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/spyder-1.1.3-py2.7.egg’ coming from? —————————————————————————————— Fl1cker:python2.7 cbhe$ cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages Fl1cker:site-packages cbhe$ ls -l total 728 -rw-rw-r-- 1 root admin 119 26 Nov 12:28 README drwxrwxr-x 8 root admin 272 22 Mar 15:25 _markerlib -rw-rw-r-- 1 cbhe admin 210 22 Mar 15:25 easy-install.pth -rw-rw-r-- 1 root admin 126 22 Mar 15:25 easy_install.py -rw-rw-r-- 1 root admin 360 22 Mar 15:43 easy_install.pyc -rw-rw-r-- 1 root admin 360 22 Mar 15:43 easy_install.pyo -rw-rw-r-- 1 root admin 101530 22 Mar 15:25 pkg_resources.py -rw-rw-r-- 1 root admin 119766 22 Mar 15:43 pkg_resources.pyc -rw-rw-r-- 1 root admin 119766 22 Mar 15:43 pkg_resources.pyo drwxrwxr-x 74 root admin 2516 22 Mar 15:25 setuptools drwxrwxr-x 11 root admin 374 22 Mar 15:25 setuptools-7.0.dist-info -rw-rw-r-- 1 cbhe admin 30 28 Jul 2010 setuptools.pth drwxrwxr-x 5 cbhe admin 170 28 Jul 2010 spyder-1.1.3-py2.7.egg Fl1cker:site-packages cbhe$ ———————————————————————————— It looks as if the directory was installed when I first started experimenting with Spyder in 2010. Access to Networkx Networkx is referenced in the path obtained from running >> >>> import sys >> >>> sys.path from the terminal OS X command line and networkx can be imported successfully. It is not referenced in the Spyder console path and can’t be found by Spyder. What is in /Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/site-packages? ———————————————————————————— Last login: Tue Mar 24 21:16:17 on ttys000 Fl1cker:~ cbhe$ cd /Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7 Fl1cker:python2.7 cbhe$ ls -l total 35960 drwxr-xr-x@ 27 cbhe admin 918 4 Mar 08:45 IPython drwxr-xr-x@ 180 cbhe admin 6120 4 Mar 08:45 PIL drwxr-xr-x@ 26 cbhe admin 884 4 Mar 08:45 PyQt4 drwxr-xr-x@ 43 cbhe admin 1462 4 Mar 08:45 astroid drwxr-xr-x@ 8 cbhe admin 272 4 Mar 08:45 astroid-1.3.4.dist-info drwxr-xr-x@ 2 cbhe admin 68 4 Mar 08:45 config drwxr-xr-x@ 90 cbhe admin 3060 4 Mar 08:45 distutils drwxr-xr-x@ 24 cbhe admin 816 4 Mar 08:45 docutils drwxr-xr-x@ 49 cbhe admin 1666 4 Mar 08:45 jinja2 drwxr-xr-x@ 109 cbhe admin 3706 4 Mar 08:45 lib-dynload drwxr-xr-x@ 5 cbhe admin 170 4 Mar 08:45 logilab -rw-r--r--@ 1 cbhe admin 308 4 Mar 08:45 logilab_common-0.63.2-py2.7-nspkg.pth drwxr-xr-x@ 9 cbhe admin 306 4 Mar 08:45 logilab_common-0.63.2-py2.7.egg-info drwxr-xr-x@ 140 cbhe admin 4760 4 Mar 08:45 matplotlib drwxr-xr-x@ 4 cbhe admin 136 4 Mar 08:45 minimal-lib drwxr-xr-x@ 12 cbhe admin 408 4 Mar 08:45 mpl_toolkits drwxr-xr-x@ 43 cbhe admin 1462 4 Mar 08:45 nose drwxr-xr-x@ 35 cbhe admin 1190 4 Mar 08:45 numpy drwxr-xr-x@ 30 cbhe admin 1020 4 Mar 08:45 pandas drwxr-xr-x@ 62 cbhe admin 2108 4 Mar 08:45 patsy drwxr-xr-x@ 10 cbhe admin 340 4 Mar 08:45 pep8-1.6.2.dist-info -rw-r--r--@ 1 cbhe admin 81919 4 Mar 08:45 pep8.py -rw-r--r--@ 1 cbhe admin 74848 4 Mar 08:45 pep8.pyc drwxr-xr-x@ 20 cbhe admin 680 4 Mar 08:45 psutil drwxr-xr-x@ 16 cbhe admin 544 4 Mar 08:45 pyflakes drwxr-xr-x@ 36 cbhe admin 1224 4 Mar 08:45 pygments drwxr-xr-x@ 26 cbhe admin 884 4 Mar 08:45 pylint drwxr-xr-x@ 9 cbhe admin 306 4 Mar 08:45 pylint-1.4.1.dist-info drwxr-xr-x@ 7 cbhe admin 238 4 Mar 08:45 rope drwxr-xr-x@ 34 cbhe admin 1156 4 Mar 08:45 scipy drwxr-xr-x@ 30 cbhe admin 1020 4 Mar 08:45 seaborn -rw-r--r--@ 1 cbhe admin 444886 4 Mar 08:45 setuptools-5.4.2-py2.7.egg -rw-r--r--@ 1 cbhe admin 29 4 Mar 08:45 setuptools.pth -rw-r--r--@ 1 cbhe admin 17791131 4 Mar 08:45 site-packages.zip lrwxr-xr-x 1 cbhe admin 14 4 Mar 08:45 site.pyc -> ../../site.pyc drwxr-xr-x@ 28 cbhe admin 952 4 Mar 08:45 skimage drwxr-xr-x@ 63 cbhe admin 2142 4 Mar 08:45 sklearn drwxr-xr-x@ 50 cbhe admin 1700 4 Mar 08:45 sphinx drwxr-xr-x@ 38 cbhe admin 1292 4 Mar 08:45 spyderlib drwxr-xr-x@ 14 cbhe admin 476 4 Mar 08:45 spyderplugins drwxr-xr-x@ 32 cbhe admin 1088 4 Mar 08:45 statsmodels drwxr-xr-x@ 45 cbhe admin 1530 4 Mar 08:45 sympy drwxr-xr-x@ 16 cbhe admin 544 4 Mar 08:46 zmq Fl1cker:python2.7 cbhe$ ——————————————————————————————————— The only site-packages file is a .zip file that I assume came along with a download. Installation of Python 2.7.9 I installed Python (hopefully correctly) by using the Launcher (icon looks like a V2 rocket) that accompanied the download.I don’t understand the relationship between the /Library and the /Applications file references but they appear to me to be the main difference between the system Python path and the Spyder Python path I suspect these answers may not really address what you want to know but hope they help in some way. Chris > On 24 Mar 2015, at 3:02 am, Adrian Klaver <[email protected]> wrote: > > On 03/22/2015 09:13 PM, Chris Edwards wrote: >> Adrian, >> >> _From Terminal - Python interpreter path below:_ >> >> >>> import sys >> >>> sys.path >> ['', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/spyder-1.1.3-py2.7.egg', >> '/Library/Python/2.7/site-packages/PyMetis-2014.1-py2.7-macosx-10.10-intel.egg', >> '/Library/Python/2.7/site-packages/networkx-1.9.1-py2.7.egg', >> '/Library/Python/2.7/site-packages/decorator-3.4.0-py2.7.egg', >> '/Library/Python/2.7/site-packages/metis-0.1a-py2.7.egg', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', >> '/Library/Python/2.7/site-packages'] >> >>> >> >> _From Spyder - Python Console path below:_ >> >> >>> sys.path >> ['', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/widgets/externalshell', >> '/Library/Python/2.7/site-packages/networkx-1.9.1-py2.7.egg', >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/spyder-1.1.3-py2.7.egg', >> '/Users/cbhe/scripts', '/Users/cbhe/Documents/Python User Files >> 2015/Development Code', >> '/Applications/Spyder-Py2.app/Contents/Resources', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python27.zip', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/plat-darwin', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/plat-mac', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/plat-mac/lib-scriptpackages', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/lib-tk', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/lib-old', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/lib-dynload', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/site-packages.zip', >> '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/site-packages'] >> >>> >> >> _From Spyder - When I try to open an IPython Console I get:_ > > Can you open IPython from the OS X command line? > >> >> An error ocurred while starting the kernel >> >> I don’t understand why this error should suddenly appear. I uninstalled >> Spyder and then reinstalled it from the .dmg download but still got the >> same error. >> >> From the above it seems clear that the two paths are different. Now, >> how does one (hopefully easily) correct the Spyder system path?? > > There are questions to be answered before we get that point: > > 1) Where is: > > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/spyder-1.1.3-py2.7.egg' > > coming from? > > 2) In the Spyder console path is: > > '/Library/Python/2.7/site-packages/networkx-1.9.1-py2.7.egg', > > So are you sure you cannot import it into the Spyder Python console? > > 3) What is in ?: > > '/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/site-packages' > > 4) Again, how exactly are you installing the system Python? > >> >> Chris >> >> > > -- > 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/RxXRhb2pQOI/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.
