Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Here we go again another nightmare
#11
Error:
File "c:\python27\lib\site-packages\pip\_vendor\html5lib\treebuilders\etree.py ", line 19, in getETreeBuilder    ElementTreeCommentType = ElementTree.Comment("asd").tag AttributeError: 'module' object has no attribute 'Comment'
Search an see if you have named a file etree.py
I you have rename it.
metulburr likes this post
Quote
#12
(Nov-13-2016, 01:09 AM)Blue Dog Wrote: That may be so but I can run it, i get error not found
Are you talking about urllib?
*** Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32. ***
>>> import urllib
>>>
Quote
#13
here very thing I have install
RESTART: C:\Users\renny and kite\Desktop\Python\Python code snpppets\check all
the mogler installed\check mod\check mod\check_mod.py
['attrs==16.2.0', 'beautifulsoup4==4.5.0',
 'cffi==1.8.3',
'constantly==15.1.0',
'cryptography==1.5.3',
'cssselect==1.0.0',
'dnet==1.12',
'enum34==1.1.6',
'get==0.0.0',
 'idna==2.1',
'incremental==16.10.1',
'ipaddress==1.0.17',
'lxml==3.6.4',
'parsel==1.0.3',
'pip==9.0.0',
'post==0.0.0',
'public==0.0.0',
'pyasn1-modules==0.0.8',
'pyasn1==0.1.9',
'pycparser==2.17',
'pydispatcher==2.0.5',
'pyopenssl==16.2.0',
'query-string==0.0.0',
'queuelib==1.4.2',
'request==0.0.0',>>>>>>>>>>>>>>You can see That should be installed but it is not
'requests==2.11.1',
'scapy==2.3.1',
'scrapy==1.2.1',
'service-identity==16.0.0',
'setupfiles==0.0.13',
'setuptools==20.10.1',
'six==1.10.0',
'twisted==16.5.0',
'w3lib==1.15.0',
'wheel==0.29.0',
'zope.interface==4.3.2']
['attrs==16.2.0',
'beautifulsoup4==4.5.0',
'cffi==1.8.3',
'constantly==15.1.0',
'cryptography==1.5.3',
'cssselect==1.0.0',
'dnet==1.12',
'enum34==1.1.6',
'get==0.0.0',
'idna==2.1',
'incremental==16.10.1',
'ipaddress==1.0.17',
'lxml==3.6.4',
'parsel==1.0.3',
'pip==9.0.0',


I can install anything Why? here I try to run a program with 'request in it, this is what i got.

Traceback (most recent call last):
  File "C:\Users\renny and kite\Desktop\Python\web scraping the book\example_7\example_7\example_7.py", line 1, in <module>
    from urllib.request import urlopen
ImportError: No module named request
Quote
#14
Well, that is certainly not all the modules you have.

In your cmd terminal, enter:
python
>>>help()
>>>modules

* it takes a moment to populate
** type "quit" to exit back to python
to see a list of all installed modules. If all you see is what you've shown, then your Python is totally messed up and I would suggest you uninstall/reinstall Python.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Quote
#15
Quote:from urllib.request import urlopen
This only work in Python 3 and you use Python 2.
#Python 3
from urllib.request import urlopen

#Python 2
from urllib2 import urlopen
Quote:I can install anything Why? here I try to run a program with 'request in it, this is what i got.
Can not help when we do not know what you do,have you check etree.py.
As sparkz_alot suggests reinstall can be easier,if pip do not work.
Quote
#16
thanks Snippsat that worked
Quote
#17
(Nov-13-2016, 05:16 PM)Blue Dog Wrote: I can install anything Why? here I try to run a program with 'request in it, this is what i got.

Traceback (most recent call last):
  File "C:\Users\renny and kite\Desktop\Python\web scraping the book\example_7\example_7\example_7.py", line 1, in <module>
    from urllib.request import urlopen
ImportError: No module named request
Yes, there is no module named request. There is a module named requests

Hmm! You import urllib.request. Anyway. Have you tried to install Anaconda?
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Quote
#18
I found a way to install my stuuf now.
Thank you all
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)