I'm working out of "Automate the Boring Stuff with Python" 2nd edition (about two-thirds down on this page https://automatetheboringstuff.com/2e/chapter12/)
I installed python 3.8 on a new windows machine (surface pro 6)
I'm a novice at python and programming in general
Working in Mu (per book instructions) but also the command line
I installed, uninstalled, and re-installed bs4 in the same fashion that I installed other modules which appear to be working.
### Below shows uninstall bs4 and then re-install, copy/pasted from command line ###
C:\Users\USER\AppData\Local\Programs\Python\Python38\Scripts>pip uninstall beautifulsoup4 Found existing installation: beautifulsoup4 4.7.1 Uninstalling beautifulsoup4-4.7.1: Would remove: c:\users\USER\appdata\roaming\python\python38\site-packages\beautifulsoup4-4.7.1.dist-info\* c:\users\USER\appdata\roaming\python\python38\site-packages\bs4\* Proceed (y/n)? y Successfully uninstalled beautifulsoup4-4.7.1 C:\Users\USER\AppData\Local\Programs\Python\Python38\Scripts>pip install beautifulsoup4 Collecting beautifulsoup4 Downloading beautifulsoup4-4.8.2-py3-none-any.whl (106 kB) |████████████████████████████████| 106 kB 1.1 MB/s Requirement already satisfied: soupsieve>=1.2 in c:\users\USER\appdata\roaming\python\python38\site-packages (from beautifulsoup4) (1.9.5) Installing collected packages: beautifulsoup4 Successfully installed beautifulsoup4-4.8.2
### above is from command line ###
However, when I run this code (per the book and link in the opening of this post):
import requests, bs4
res = requests.get('https://nostarch.com')
res.raise_for_status()
noStarchSoup = bs4.BeautifulSoup(res.text, 'html.parser')
type(noStarchSoup)
I get this error in Mu:
Traceback (most recent call last):
File "c:\users\USER\mu_code\bs4tests.py", line 1, in <module>
import requests, bs4
ModuleNotFoundError: No module named 'bs4'
I've googled this several times and not seen a solution that solves my specific issue.
Appreciate any help - thx
I installed python 3.8 on a new windows machine (surface pro 6)
I'm a novice at python and programming in general
Working in Mu (per book instructions) but also the command line
I installed, uninstalled, and re-installed bs4 in the same fashion that I installed other modules which appear to be working.
### Below shows uninstall bs4 and then re-install, copy/pasted from command line ###
C:\Users\USER\AppData\Local\Programs\Python\Python38\Scripts>pip uninstall beautifulsoup4 Found existing installation: beautifulsoup4 4.7.1 Uninstalling beautifulsoup4-4.7.1: Would remove: c:\users\USER\appdata\roaming\python\python38\site-packages\beautifulsoup4-4.7.1.dist-info\* c:\users\USER\appdata\roaming\python\python38\site-packages\bs4\* Proceed (y/n)? y Successfully uninstalled beautifulsoup4-4.7.1 C:\Users\USER\AppData\Local\Programs\Python\Python38\Scripts>pip install beautifulsoup4 Collecting beautifulsoup4 Downloading beautifulsoup4-4.8.2-py3-none-any.whl (106 kB) |████████████████████████████████| 106 kB 1.1 MB/s Requirement already satisfied: soupsieve>=1.2 in c:\users\USER\appdata\roaming\python\python38\site-packages (from beautifulsoup4) (1.9.5) Installing collected packages: beautifulsoup4 Successfully installed beautifulsoup4-4.8.2
### above is from command line ###
However, when I run this code (per the book and link in the opening of this post):
import requests, bs4
res = requests.get('https://nostarch.com')
res.raise_for_status()
noStarchSoup = bs4.BeautifulSoup(res.text, 'html.parser')
type(noStarchSoup)
I get this error in Mu:
Traceback (most recent call last):
File "c:\users\USER\mu_code\bs4tests.py", line 1, in <module>
import requests, bs4
ModuleNotFoundError: No module named 'bs4'
I've googled this several times and not seen a solution that solves my specific issue.
Appreciate any help - thx