Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble in running tool
#1
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]
Reply
#2
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-Pac...-py-Freeze
Reply
#3
(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
Reply
#4
here what it says mr Admin .

[Image: fpHio4R.jpg]
Reply
#5
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:\>
Reply
#6
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'
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
Reply
#7
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 .
Reply
#8
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?
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
Reply
#9
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]
Reply
#10
It's saying that in your grabber.py file you are still using

from BeautifulSoup import BeautifulSoup
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
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020