Installing BeautifulSoup with easy_install (broken?)

Diez B. Roggisch deets at nospam.web.de
Fri Apr 18 12:27:07 EDT 2008


Larry Bates schrieb:
> Diez B. Roggisch wrote:
>> Larry Bates schrieb:
>>> Info:
>>>
>>> Python version: ActivePython 2.5.1.1
>>> Platform: Windows
>>>
>>> I wanted to install BeautifulSoup today for a small project and 
>>> decided to use easy_install.  I can install other packages just 
>>> fine.  Unfortunately I get the following error from BeautifulSoup 
>>> installation attempt:
>>>
>>> C:\Python25\Lib\SITE-P~1>easy_install BeautifulSoup
>>> Searching for BeautifulSoup
>>> Reading http://pypi.python.org/simple/BeautifulSoup/
>>> Reading http://www.crummy.com/software/BeautifulSoup/
>>> Reading http://www.crummy.com/software/BeautifulSoup/download/
>>> Best match: BeautifulSoup 3.0.5
>>> Downloading 
>>> http://www.crummy.com/software/BeautifulSoup/download/BeautifulSoup-
>>> 3.0.5.tar.gz
>>> Processing BeautifulSoup-3.0.5.tar.gz
>>> Running BeautifulSoup-3.0.5\setup.py -q bdist_egg --dist-dir 
>>> c:\docume~1\larry\l
>>> ocals~1\temp\easy_install-cfdxna\BeautifulSoup-3.0.5\egg-dist-tmp-gbrpp5
>>> Traceback (most recent call last):
>>>   File "C:\Python25\Scripts\easy_install-script.py", line 8, in <module>
>>>     load_entry_point('setuptools==0.6c8', 'console_scripts', 
>>> 'easy_install')()
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\comm 
>>>
>>> and\easy_install.py", line 1671, in main
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\comm 
>>>
>>> and\easy_install.py", line 1659, in with_ei_usage
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\comm 
>>>
>>> and\easy_install.py", line 1675, in <lambda>
>>>   File "C:\Python25\lib\distutils\core.py", line 151, in setup
>>>     dist.run_commands()
>>>   File "C:\Python25\lib\distutils\dist.py", line 974, in run_commands
>>>     self.run_command(cmd)
>>>   File "C:\Python25\lib\distutils\dist.py", line 994, in run_command
>>>     cmd_obj.run()
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\comm 
>>>
>>> and\easy_install.py", line 211, in run
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\comm 
>>>
>>> and\easy_install.py", line 446, in easy_install
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\comm 
>>>
>>> and\easy_install.py", line 476, in install_item
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\comm 
>>>
>>> and\easy_install.py", line 655, in install_eggs
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\comm 
>>>
>>> and\easy_install.py", line 930, in build_and_install
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\comm 
>>>
>>> and\easy_install.py", line 919, in run_setup
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\sand 
>>>
>>> box.py", line 27, in run_setup
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\sand 
>>>
>>> box.py", line 63, in run
>>>   File 
>>> "C:\Python25\lib\site-packages\setuptools-0.6c8-py2.5.egg\setuptools\sand 
>>>
>>> box.py", line 29, in <lambda>
>>>   File "C:\VOL1\Larry\Websafe\Python\wstools\setup.py", line 2, in 
>>> <module>
>>>     import py2exe
>>>   File "C:\VOL1\Larry\Websafe\Python\wstools\unittest.py", line 3, in 
>>> <module>
>>>     class TextCtrlTest(unittest.TestCase):
>>> AttributeError: 'module' object has no attribute 'TestCase'
>>>
>>>
>>> Thanks in advance for any "clues".
>>
>> I'm not sure what happens - but I think it is suspicious that these 
>> "wstools" get into the way. And it looks as if wstools.unittest 
>> imports itself, instead of the python-unittest - which must be solved 
>> with getting the sys.path fixed.
>>
>> Diez
> 
> Sharp eyes Diez, I overlooked that.  This is a path that I search for some
> tools I've written.  It is set in PYTHONPATH environment variable.  I 
> cleared
> PYTHONPATH and easy_install BeautifulSoup worked.  Still not quite clear 
> why.

Mayb setuptools imports setup.py - but because of you having another one 
on the PYTHONPATH, it gets that instead of the one actually needed by 
setuptools? Only thing that helps is looking at sandbox.py, line 29.

Diez



More information about the Python-list mailing list