ModuleNotFoundError: No module named 'feedparser' - python

I have Python 3.11 and I have done everything expect Anaconda thing in this video below to try and fix this issue.
https://www.youtube.com/watch?v=RvbUqf3Tb1s&t=181s&ab_channel=TechWithTim
Here is the error:
C:\Python311\python.exe
C:\Users\16789\PycharmProjects\cyberNewsfeed\main.py Traceback (most
recent call last): File
"C:\Users\16789\PycharmProjects\cyberNewsfeed\main.py", line 1, in
import feedparser ModuleNotFoundError: No module named 'feedparser'
Attached is a screenshot of my interpeter and structue.
Tried everything in the linked video besides anaconda and i was expecting it to run. I restarted my computer as well.

You have to install the missing package. Try this in a shell inside your python environment.
pip install feedparser

Related

Where does Cygwin64 store/look for Python packages?

I'm trying to use Cygwin64 to run a python script, but it's not working because for some reason it can't find the module.
Traceback (most recent call last):
File "makeplot.py", line 1, in <module>
import vplanet
ModuleNotFoundError: No module named 'vplanet'
Where are modules installed in Cygwin64 and How do I make sure my module is installed?
It seems you are expecting that Cygwin version of Python should contain any type of module around.
If you look for vplanet, you will find the specific instruction for installation
https://virtualplanetarylaboratory.github.io/vplanet/install.html
python -m pip install vplanet
Have you tried it ?

Python pip Modules not found by Python 3.9 " No module named '...' "

Recently I installed Python 3.9 and I did NOT mark “Add Python 3.9 to PATH” because I was not aware of the effect. Uninstalling & reinstalling with marking the checkbox has no effect.
My problem is Python 3.9 does not find installed pip modules which are located at:
c:\users\USER\virtualenv\scripts
My question is; how could I indicate the new version of Python, where to find installed pip modules?
I also tried to add a new entry to the Environment Variables as described on following tutorial:
https://datatofish.com/add-python-to-windows-path/
In my case I put:
Path
C:\Users\USER\AppData\Local\Programs\Python\Python39; C:\Users\USER\VirtualEnv\Scripts
Python 3.9 still shows:
import openpyxl
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'openpyxl'
import selenium
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'selenium'
I hope I explained well enough and you could help me… Thanks to everybody!

Why won't Python recognize that PyPDF2 is installed?

I'm trying to import PyPDF2 and it won't work. I installed it using pip, then tried it with pip3, it is installed. When I try to import I get the error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PyPDF2'
I'm using Python 3.7. I found a similar issue here, doesn't seem any of the answers worked and I tried them myself to the same results.
If anyone else runs into this problem try using sys.path to find the site-packages directory. I copied my PyPDF2 packages into my Python37 directory and now it works.

Module can be imported in the terminal, but not IDLE

Recently, when I use pip to install python modules, I will get an error saying that the module has not been downloaded when I run it in the IDLE. However, when I run the same script in the terminal, it works fine. What is this error and how can I solve it?
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
import gspread
ModuleNotFoundError: No module named 'gspread'
Probably you have different versions of python installed.
The version you used pip to install new modules is different from the version you access with IDLE.

Failing to install Python openpyxl module

I have installed the openpyxl Python module in my machine, or at least I thought I've done that. I entered these commands on the command prompt (on Windows):
C:\Users\gluti>cd C:\Users\gluti\PycharmProjects\Data Structures\venv\Scripts
C:\Users\gluti\PycharmProjects\Data Structures\venv\Scripts>pip install openpyxl==2.1.4
And then, it shows a message, saying that the module openpyxl was successfully installed. However, when I try to import this module on Python IDLE, it shows the following error message:
import openpyxl
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import openpyxl
ModuleNotFoundError: No module named 'openpyxl'
Did I miss something or am I installing the module in the wrong directory?
It is possible you have installed python 2 and python 3 so there are two different versions of pip on your machine.
You need to ensure you are installing openpyxl in the same type of python that you are using to run the script.

Categories