ModuleNotFoundError: No module named 'letters' - python

I'm trying to import cryptography for my project, but for some reason when I try to install it, I get No module named 'letters'. Through pip and pip3 it worked without any problem, but when I want to install it from settings in PyCharm, the error pops out.

Related

ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

I decided to try and build a simple web browser with python, but even after running pip install PyQt5 and PyQtWebEngine I still get the error ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'.
And before you redirect me to the many other posts on this topic I have tried most of the solutions not they do not work. (I do have the latest version of pip)
Fixed it nvm (I installed python 3.11)

No module named 'PIL' after pip installing it

I'm trying to use Pillow in my python(tkinter) project. I used pip install Pillow to install the package.
When I type from PIL import ImageTk, Image and try to run my code I get the error ModuleNotFoundError: No module named 'PIL. I tried several things like updating pip, uninstalling Pillow and reinstalling it again, using different commands to install it etc.
I don't know what to do now since I never had this problem before. Does anybody know how to fix this?

Pycharm Module Installation: ModuleNotFoundError: No module named 'utilities'

I am using Pycharm Virtual Environment for a project and working on windows 8.1 x64. Trying to do image processing on python and for this needed to import utilities. The package is present at this link. https://pypi.org/project/utilities/
In my code i am using these commands:
from utilities.utilities import Utilities as Utils
import utilities.constants as Constants
and when I try to do pip install utilities or try to install the package from settings, even though it is present there but it gives these errors
ModuleNotFoundError: No module named 'utilities'
How can I install this package if I cannot use pip then how do i manually install from package. Please guide on both.

pip list shows installed module but still getting import error

I am working with python flask's requests module. I have installed requests module using :
pip install requests
And verified that requests module exists when I run :
pip list
But when I run my python application , I receive import Error for requests module.
I noticed that pip is installing the module in C:\Users\xx\Documents\Projects\Python\Python3REST\lib\site-packages\ folder BUT the interpreter is looking for the module in C:\Users\xx\Documents\Projects\Python\Python3REST\lib\site-packages\flask\ folder.
I have tried running the command :
pip install --install-option="Path to install in" requests
But threw some other error.
The import error I am getting states :
ImportError: cannot import name 'requests' from 'flask'
(C:\Users\xx\Documents\Projects\Python\Python3REST\lib\site-packages\flask\__init__.py)
I am working in virtualenv in Windows 10.
I recently had the same problem installing a self made package. I installed it with pip install <package> and checked it was actually installed with pip list but running the script with import <package> returned a ModuleNotFoundError: No module named <package>.
I solved the problem creating an empty file called __init__.py in the package directory.
Check https://pythontips.com/2013/07/28/what-is-init-py/ and https://docs.python.org/3/tutorial/modules.html#packages for better understanding.
what if you add that folder to your path? using sys.path.extend?
I solved it using python3 -m pip install <package name>. In the OP's case, it should be python3 -m pip install requests.
Note that I'm using python 3.10.

ImportError: No module named pyreadability in conda env

in my python code I've got the line:
from pyreadability import pyreadability as pyrb
And I'm getting the error :
ImportError: No module named pyreadability
I'm in Ubuntu, using python 2.7 and running code inside a conda env named mzh27.
I already tried these commands but none of them made the error solve
pip install PyReadability
conda install -c anaconda lxml
/home/{usr}/anaconda2/envs/mzh27/bin/pip install PyReadability
pip install readability-lxml
/home/{usr}/anaconda2/envs/mzh27/bin/pip readability-lxml
In all of those cases, the module installed successfully but error was still there.
Any Idea what to do for it?
The problem was the repository I've cloned was missing the file named pyreadability.py. The package was not the one I thought. It was implemented by the repository owner (who forgot to add files to the repository) and just have similar names to python packages that are available to install.

Categories

Resources