Adrian,

Get rid of 
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/spyder-1.1.3-py2.7.egg’

I moved the directory to the .old directory (below)

Fl1cker:site-packages cbhe$ mv spyder-1.1.3-py2.7.egg spyder-1.1.3-py2.7.egg.old
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.old
Fl1cker:site-packages cbhe$ 


Check paths for presence of Networkx


a. From the OS X Terminal the path below shows reference to Pymetis, Networkx 
and Metis. I thought that is what I had sent previously but apologise for any 
misunderstanding that I may have caused.

Fl1cker:site-packages 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 sys
>>> sys.path
['', 
'/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']
>>> 


b. From the Spyder Python console the following path was shown. There does not 
appear to be any reference to Pymetis, Networkx or Metis

—————————————————————————————
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 sys
>>> sys.path
['', 
'/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/utils/external’,
'/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']
>>> 
——————————————————————————————


c. From the Spyder IPython console (this time there was no error message) the 
following path was shown. Again no reference to the three external packages 
that I want to use.

———————————————————————————————
IPython 3.0.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
%guiref   -> A brief reference about the graphical user interface.

In [1]: import sys

In [2]: sys.path
Out[2]: 
['',
 
'/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/utils/external',
 '/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',
 
'/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/IPython/extensions',
 '/Users/cbhe/.ipython']
In [3]: 
———————————————————————————————

Source of Python package

I downloaded the Python package from

https://www.python.org/downloads/source/ 
<https://www.python.org/downloads/source/>

Starting again from scratch

If you recommend that I do this would you be able to outline the steps required.

Summary

What I find odd is the fact that I can execute a python program that imports 
Networkx from the OS X Terminal, but that package is not recognised by Spyder. 
I can’t help wondering if the problem could be solved by adding to the Spyder 
system path (if that is possible).

Thanks for your patience.

Chris


> On 25 Mar 2015, at 12:57 am, Adrian Klaver <[email protected]> wrote:
> 
> On 03/24/2015 04:08 AM, Chris Edwards wrote:
>> Adrian,
>> 
>> Below are my attempts to answer your questions.
>> 
>> _Attempt to run Ipython from OS X command line_
>> 
> 
> So IPython is not installed in the system Python.
> 
>> 
>> 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?_
> 
>> It looks as if the directory was installed when I first started
>> experimenting with Spyder in 2010.
>> 
> 
> Get rid of it.
> 
>> _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.
> 
> That is not what you showed in your previous post. Go back to it and take a 
> look and confirm whether the paths you show are correct.
> 
>> 
>> 
>> _What is in
>> /Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/site-packages?_
>> 
> 
> So the stuff that is packaged with Spyder.
> 
>> ———————————————————————————————————
>> 
>> 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
> 
> Where did you get the Python package to begin with?
> 
>> 
>> I suspect these answers may not really address what you want to know but
>> hope they help in some way.
> 
> I am thinking the only way to solve this is to go to square one and start 
> over from scratch. The only caveat is how deeply your system depends on 
> 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.

Reply via email to