0

I am working on a server and I am experiencing problems installing "easy-install" module for python 2.7.3

This is very unusual and that's why I come to you guys (couldn't find any solution on the Internet)

This server is a debian 2.6.32. The company that rents it might have its own packages repos, because when I tried

apt-get install python

all I could get was the 2.6 version. I manually installed python. (to complete the installation, at the end of the .bashrc file, I added the following line :

PATH=~/python/bin:$PATH

I installed python-setuptools as well.

When I try to install easy-install, I started with a "locate easy_install", which gave me the following output :

/usr/bin/easy_install
/usr/share/pyshared/easy_install.py
/usr/share/pyshared/setuptools/command/easy_install.py
/usr/share/pyshared/setuptools/command/easy_install.pyc
/usr/share/pyshared/setuptools/tests/test_easy_install.py

I tried to install it but it didn't work. I can use the one in "pyshared" with the following command :

python /usr/share/pyshared/easy_install.py trac

but it won't give me better than Trac 0.11.70 I tried :

python /usr/share/pyshared/easy_install.py --upgrade Trac==0.12

as suggested in Trac's doc, but i get a "error: Not a recognized archive type: /tmp/easy_install-t9u9P5/Trac-0.12.tar.gz"

The manual installation of trac didn't work : "ImportError: No module named setuptools". When I try to install it (download the .egg file), its installation crashes : "zipimport.ZipImportError: can't decompress data; zlib not available". An "apt-get install zlib-bin" reveals that zlib is already installed.

Oh, and when I tried the following :

python easy_install.py install

(in the "setuptools/command directory from above), i got :

Traceback (most recent call last):
  File "easy_install.py", line 15, in <module>
    from setuptools import Command, _dont_write_bytecode
ImportError: No module named setuptools

so looks like I'm pretty much screwed... I tried everything I could find but it seems like my computer won't detect some packages. Maybe it is because I manually installed python 2.7 (an apt-get install python reveals that python 2.6 is already installed)

Does anyone know why it can't seem to work and what I should do to make it work ?

Thank you very much !

Yace
  • 165
  • 1
  • 3
  • 6

2 Answers2

1

To solve this problem: Traceback (most recent call last): File "easy_install.py", line 15, in from setuptools import Command, _dont_write_bytecode ImportError: No module named setuptools

Because lack of python setuptools, you can download setuptools 0.6c11 here: https://pypi.python.org/pypi/setuptools/0.6c11#downloads

and setup it by "python setup.py install". Then you can set up other plugins.

Na Li
  • 11
  • 1
0

Debian stable 6.0.x Squeeze supports Python 2.5, 2.6 (default) as well as 3.0, so your initial stance is not necessarily true. This might be distribution native packages. And by now it's fine to go even with Python2.5 for Trac. BTW, what's your requirement for a later Python version?

At any rate, if you need it, try python-virtualenv even better in combination with virtualenvwrapper and roll your own libraries inside a virtual environment. Messing with system-wide installed libraries leads you ..., well you noticed already.

Still it's possible to re-use already installed Python stuff by including it via symlinks. I've found a good guide via another SO question, that I follow with success in my own development setup to have different combinations of versions of Python, Trac and Trac Plugins in ready-made virtual environments right at hand.

Community
  • 1
  • 1
hasienda
  • 2,390
  • 1
  • 13
  • 16