On Tue, 22 Jul 2008 10:25:55 -0700, "Mike Orr" <[EMAIL PROTECTED]>
wrote:
> On Tue, Jul 22, 2008 at 8:39 AM, mario ruggier <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> was trying to install pylons on a linux box running suse, having python
>> 2.5.2. I chose to try and install it "normally", i.e. without a py
> virtual
>> env. I tred to follow the instructions in the pylonsbook, however, the
> last
>> command below gives the indicated error:
>>
>> $ wget http://peak.telecommunity.com/dist/ez_setup.py
>> $ python ez_setup.py
>> Setuptools version 0.6c8 or greater has been installed.
>> (Run "ez_setup.py -U setuptools" to reinstall or upgrade.)
>> $ sudo python ez_setup.py -U setuptools
>> Searching for setuptools
>> Reading http://pypi.python.org/simple/setuptools/
>> Best match: setuptools 0.6c8
>> Processing setuptools-0.6c8-py2.5.egg
>> setuptools 0.6c8 is already the active version in easy-install.pth
>> Installing easy_install script to /usr/local/bin
>> Installing easy_install-2.5 script to /usr/local/bin
>>
>> Using /usr/local/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg
>> Processing dependencies for setuptools
>> Finished processing dependencies for setuptools
>> $ easy_install PasteDeploy
>> Traceback (most recent call last):
>>  File "/usr/local/bin/easy_install", line 5, in ?
>>    from pkg_resources import load_entry_point
>> ImportError: No module named pkg_resources
>>
>> First of all, is this the correct install procedure?
>> What is the issue with this missing pgk_resources?
>> Where do I get it from?
> 
> pkg_resources is part of setuptools.  That suggests something is wrong
> with the Python path and it's not finding any of the new packages.
> Did you install Python to /usr/local or are you using the system
> Python?  The standard Python in Debian/Ubuntu is specially configured
> to look for packages in /usr/local/lib/python2.5/site-packages, but I
> don't know if Suse does this.

Yes in installed 2.5.2 to /usr/local :

$ which python
/usr/local/bin/python
$ python
Python 2.5.2 (r252:60911, Jul  8 2008, 17:38:14)
[GCC 4.1.2 20070115 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Yes, there was (still is, but unused afaict) :

$ /usr/bin/python
Python 2.4.2 (#1, Apr 13 2007, 15:45:45)
[GCC 4.1.0 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

> Do you have multiple copies of Python installed?  If so you have to
> make sure you're using the same copy for ez_setup.py, easy_install,
> python, and paster; e.g., watch out for the shell defaulting to a
> different one.

Starting new shells gives 2.5.2. How do i easily make make sure that all
those are also using 2.5.2?

> Do you have a custom distutils.cfg or ~/.pydistutils.cfg?   

No. Doing:
$ sudo find / | grep -i distutils
only gives results for files under:
/usr/local/lib/python2.5/distutils/... 


> It's
> possible to configure easy_install to install packages to a directory
> where Python can't see them.  In that case you either have to change
> your install location or make a *.pth file that does "import site;
> site.addsitedir('/the/directory/easy_install/is/installing/into')".

OK, i made /usr/local/lib/python2.5/site-packages/ez-hack.pth :
import site; site.addsitedir('/usr/local/lib/python2.5/site-packages')

But then:
$ python ez_setup.py
'import site' failed; use -v for traceback
Setuptools version 0.6c8 or greater has been installed.
(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)

Ane the error is a:
RuntimeError: maximum recursion depth exceeded

Note that there is also this file:
$ cat /usr/local/lib/python2.5/site-packages/easy-install.pth
import sys; sys.__plen = len(sys.path)
./setuptools-0.6c8-py2.5.egg
./Durus-3.7-py2.5-linux-i686.egg
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:];
p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert =
p+len(new)


Thanks... mario


> --
> Mike Orr <[EMAIL PROTECTED]>



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to