Just started learning python and am so lost on getting installed package to work

67 views Asked by At

First some preemptive info: -py version 3.12.2 -pip 24.0

I started my python journey learning some coding basics and diving into some online excercises. Using it in a practical way has been very motivating until I got to Exercise 17 here: https://www.practicepython.org/exercise/2014/06/06/17-decode-a-web-page.html

This exercise requires some pip installs to build a web scraper. The script imports are 'requests' and 'bs4'. After installing both, I run test script and get a bug at the first import: ModuleNotFoundError: No module named 'requests'

I went into a rabbithole of websleuthing for more information and can't figure out where I went wrong. On initial install, I got a warning message stating that the installation was not done to 'PATH'. Again, I'm very new to this so I may have setup something incorrectly. Did this warning have anything to do with why it won't work?

Thank you for your help

Attempted to reinstall packages, all required dependencies are fullfilled. Verified python version and pip version.

pip show requests: Name: requests Version: 2.31.0 Summary: Python HTTP for Humans. Home-page: https://requests.readthedocs.io Author: Kenneth Reitz Author-email: [email protected] License: Apache 2.0 Location: C:\Users\me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages Requires: certifi, charset-normalizer, idna, urllib3 Required-by: PS C:\Users\me\OneDrive\Matt\Documents\Learning & Development\Online Course Material\Programming\Python\PracticePython.org>

import sys; print(sys.path): PS C:\Users\me\OneDrive\Matt\Documents\Learning & Development\Online Course Material\Programming\Python\PracticePython.org> c:; cd 'c:\Users\me\OneDrive\Matt\Documents\Learning & Development\Online Course Material\Programming\Python\PracticePython.org'; & 'c:\Users\me\OneDrive\Matt\Documents\Learning & Development\Online Course Material\Programming\Python\PracticePython.org\tutorial_env\Scripts\python.exe' 'c:\Users\me\.vscode\extensions\ms-python.debugpy-2024.0.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher' '59771' '--' 'C:\Users\me\OneDrive\Matt\Documents\Learning & Development\Online Course Material\Programming\Python\PracticePython.org\Exercise-17 Decode A Webpage.py'

0

There are 0 answers