Python Forum
Trouble in running tool - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Trouble in running tool (/thread-5129.html)

Pages: 1 2 3


Trouble in running tool - rjahmed - Sep-20-2017

hello friends i am new here , i need your help . i am having trouble while running this tool .
this tool required pip and beautifulsoup and i have installed it but still giving me error .

here you can see pip and beautifulsoup installed
[Image: poccc.jpg]

error while running tool :
[Image: poccc1.jpg]


RE: Trouble in running tool - Larz60+ - Sep-20-2017

1st type: pip -V
does the python that pip shows match the one where you think you loaded beautiful soup?
Probably not
That's because, looking at your post, you installed pip, which is now pre-installed  with python.
But probably the not the version you thought you had.
see: https://python-forum.io/Thread-Basic-Packaging-Modules-Wheel-pip-setup-py-Freeze


RE: Trouble in running tool - snippsat - Sep-20-2017

(Sep-20-2017, 10:33 AM)rjahmed Wrote: here you can see pip and beautifulsoup installed
No is not installed.
Do it from Scripts folder where pip.exe is placed,with pip install beautifulsoup4
From cmd:
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. Med enerett.

C:\Windows\System32>cd\
C:\>cd python27/scripts
C:\Python27\Scripts>pip install beautifulsoup4
Collecting beautifulsoup4
  Downloading beautifulsoup4-4.6.0-py2-none-any.whl (86kB)
    100% |################################| 92kB 110kB/s
Installing collected packages: beautifulsoup4
Successfully installed beautifulsoup4-4.6.0

C:\Python27\Scripts>cd ..
C:\Python27>python
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from bs4 import BeautifulSoup
>>> 
You should be using Python 3,no question asked  Wink
Python 3.6 and pip installation under Windows.
Web-Scraping part-1


RE: Trouble in running tool - rjahmed - Sep-22-2017

here what it says mr Admin .

[Image: fpHio4R.jpg]


RE: Trouble in running tool - snippsat - Sep-22-2017

Then do the last part,to make sure it work.
C:\Python27\Scripts>cd ..
C:\Python27>python
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from bs4 import BeautifulSoup
>>> 
cd .. mean that it goes back to C:\Python27> folder.
So using python command now it will use python 2.7.
I am not using python 2.7 as my default python,so if i go back to C:\ it will be 3.6.
C:\Python27>cd ..
C:\>python
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
This is a test you can so to make version don't mix,
if installed more than one python version.
Can always start 2.7 for anywhere with py -version command.
C:\>py -2.7
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>exit()
C:\>



RE: Trouble in running tool - sparkz_alot - Sep-22-2017

First of all, copy and paste all code, outputs and errors between their proper tags, do not post images.

Did you try this from snippsat:
C:\Python27\Scripts>cd ..
C:\Python27>python
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from bs4 import BeautifulSoup
>>> 
From your original post it seems as if you are trying to import 'BeautifulSoup' and not 'bs4'


RE: Trouble in running tool - rjahmed - Sep-22-2017

i have tried it what snippsat said .i am running 2.7 python only.

its not working snippsat what you said :( . i am feeling disappointed now .


RE: Trouble in running tool - sparkz_alot - Sep-22-2017

Yes, but your original error shows:
Error:
from BeautifulSoup import BeautifulSoup
which is wrong, it should be
from bs4 import BeautifulSoup
Did you make that change? If so, do you still get an error?


RE: Trouble in running tool - rjahmed - Sep-22-2017

i did this also . but still not wroking here it is

[Image: 26456541150460121e969004dc8a465ce6178236...6b832e.jpg]

now when i run my python tool still i am getting error .
[Image: bXOGqbl.jpg]


RE: Trouble in running tool - sparkz_alot - Sep-22-2017

It's saying that in your grabber.py file you are still using

from BeautifulSoup import BeautifulSoup