Question: Attempting to update the module beautifulsoup4 yields the error AttributeError: 'list_iterator' object has no attribute 'next'

Question

Attempting to update the module beautifulsoup4 yields the error AttributeError: 'list_iterator' object has no attribute 'next'

Answers 0
Added at 2017-01-03 17:01
Tags
Question

I somehow broke Spyder within Anaconda and couldn not even get it running again (some issue with connecting to the C library) so I uninstalled/deleted everything related to Spyder/Anaconda on my computer and reinstalled Anaconda.

When I go to the command prompt and enter spyder I get the following error:

  File "C:\Users\MYUSERNAME\Desktop\User\Lib\site-packages\bs4\__init__.py", line 4
8
    'You are trying to run the Python 2 version of Beautiful Soup under Python 3
. This will not work.'<>'You need to convert the code, either by installing it (
`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).'

                       ^
SyntaxError: invalid syntax

I tried running

python setup.py install

but there is no such file or directory.

I tried running

2to3 -w bs4

but there is no such file or directory.

I tried

pip install --upgrade beautifulsoup4

but I get the following error:

  File "C:\Users\MYUSERNAME\Desktop\User\Lib\site-packages\win32com\__init__.py", l
ine 93, in <module>
    __gen_path__ = iter(sys.modules["win32com.gen_py"].__path__).next()
AttributeError: 'list_iterator' object has no attribute 'next'

Does anyone have any guidance for addressing this issue?

Edit: It looks like I don't have module win32com (which seems to be the problem) but it can't install/upgrade anything until this issue is resolved so I feel like I am stuck.

Answers
Source Show
◀ Wstecz