edit: I tried the method in the comment section and now the problem becomes:
Traceback (most recent call last):
File "crawlertest.py", line 2, in <module>
from bs4 import BeautifulSoup
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/bs4/__init__.py", line 29, in <module>
from .builder import builder_registry
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/bs4/builder/__init__.py", line 7, in <module>
from bs4.element import (
ImportError: cannot import name 'Stylesheet'
I tried to install beautifulsoup4 with
pip3 install beautifulsoup4
but it said
"Could not fetch URL https://pypi.python.org/simple/beautifulsoup4/
There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:720) - skipping
Could not find a version that satisfies the requirement beautifulsoup4 (from versions: )
No matching distribution found for beautifulsoup4"
Then I tried pip3 install --upgrade pip
and then installed again and succeeded.I also installed the package "requests".
But later when I tried to run requests and beautifulsoup4 on my Mac but it showed something like this:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/urllib3/connectionpool.py", line 706, in urlopen
chunked=chunked,
and something like
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:720)
Is there any way to fix it?