This question already has answers here:
ImportError: No module named Crypto.Cipher
(33 answers)
Closed 2 years ago.
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
I am using PyCharm Community 2020.3 and Python 3.9.
This project previously compiled and ran, but I had to replace the computer and re-create my development environment, and at that point, the project failed as above.
I re-installed pycryptodome (see picture), but still getting error.
Something is causing the compiler to not take note of pycryptodome being there. Maybe something else is eclipsing it? Do I need to uninstall the library "crypto"?
I followed #madzohan link.
uninstall crypto. I had installed this because I followed PyCharm's suggestion.
uninstall pycryptodome
re-install pycryptodome
I was able to run my script no problem.
Related
This question already has answers here:
Importing installed package from script with the same name raises "AttributeError: module has no attribute" or an ImportError or NameError
(2 answers)
Closed 27 days ago.
I was trying to go through this code and constantly getting an error while importing import rioxarray as rio in python. The details of code in below.....
outfilename = os.path.join(output_folder,'Runoff_monthly_%s.%02s.%02s.tif' %(Date.strftime('%Y'), Date.strftime('%m'), '01'))
x = pr.rio.to_raster(outfilename)
print("IMD",ncfile['time'][i])
i+=1
the error i am getting in below....
File "rioxarray.py", line 26, in
from rioxarray.exceptions import (
ImportError: No module named exceptions
I am trying to solve this error while i am executing this code..
File "rioxarray.py", line 26, in
from rioxarray.exceptions import (
ImportError: No module named exceptions
This error maybe occured because the module rioxarray module is not being properly installed try reinstalling it in Command prompt using
pip install rioxarray
I have already checked the list and the "rioxarray" already installed in my environment.
1-The "rioxarray" package is not installed in your current environment: You can check if the package is installed by running "pip freeze" in your terminal and looking for the "rioxarray" package in the list. If it is not there, you can install it using "pip install rioxarray" url pypi.
2-The package version you have installed might not contain the "exceptions" module, you can check this by running pip show rioxarray, it will show you the package version, you can try updating the package using pip install --upgrade rioxarray.
This question already has answers here:
How do I install the yaml package for Python?
(12 answers)
Closed 3 months ago.
I have a script that does import yaml and then uses yaml.load and yaml.Loader
I previously installed yaml months ago using pip3 install yaml, and that worked for another script
Now, running another script was saying ModuleNotFoundError: No module named 'yaml' again (but ipython works when doing import yaml as well as from yaml import load). Tried installing using brew but now I get a new error AttributeError: module 'yaml' has no attribute 'load'.
Why is this? And how can I fix whatever's going on? I don't have any files named 'yaml' at my script level
python3 -m pip install pyyaml worked. I should rly learn pip/installing
This question already has answers here:
ImportError: No module named requests
(33 answers)
Closed 4 months ago.
I'm using Spyder with Python 3.9 and Python 3.7 respectively on Mac and Windows and I got the same issue.
I'm trying to import some packages like:
import pythonnet as clr
or
import yfinance as yf
but I get this message:
File "/var/folders/xs/1_m665393ql86dptnsrft5j80000gn/T/ipykernel_2232/2746914347.py", line 1, in <cell line: 1>
import pythonnet as clr
ModuleNotFoundError: No module named 'pythonnet'
I'm sure that I already installed these packages from the prompt. I'm facing the following issue with many packages so I suppose is it related to the working directory. This is the directory where -pip installs the package by default:
/Users/user_folder/opt/miniconda3/lib/python3.9/site-packages
I'd to understand if the issue is related to the directory and how to efficiently setup it.
Thank you in advance.
It may be that when you are running the script you are trying to run a different version of python.
When you run the pip install try python3 -m pip install instead.
If this doesn't work and you are using vscode you can simply click in the bottom right where it states the python interpreter and change what you are using.
If all of that fails to work, then sorry but that's all I can suggest with my current knowledge.
This question already has answers here:
How to use pip with Python 3.x alongside Python 2.x
(11 answers)
Closed 6 years ago.
I have installed qrcode package as pip install pyqrcode
Then when I open a python2.x shell and import it there, no errors are given. But when I open a python3 shell and try to import it there it says
ImportError: No module named 'qrcode'
I import it as import qrcode
When I installed the package with pip it says Downloading PyQRCode-1.2.tar.gz, meaning that it is installing the last version. But in pypi
it says that it also support python3.
What's the correct way to import it?
You need to download a separate package for python 3. pip3 install pyqrcode
Then you can access it. Of course you will need to install pip3 first if you don't have it.
I am trying to create a graph on Python (version 3 and above) using matplotlib, however I keep getting the error saying
ImportError: No module named 'six'
Does anyone know how to fix this? I have already tried downloading the module. And I still get this error.
Are you sure you've installed six?
If you have both python 2.x and 3.x installed, it may be that when running easy_install or pip, you're installing six for 2.x rather than 3.x. If you have pip, try running pip3 install six in a shell, or for easy_install, run easy_install-3.4 six (replace 3.4 with your 3.x python version).