i get this error when running a python script
Traceback (most recent call last):
File "C:\Users\BruceWayne\Desktop\TF\train.py", line 2, in <module>
import numpy
ImportError: No module named numpy
So i tried
pip install numpy
and the answer was that the requirement is already satisfied
Related
when i tried to install numpy from window cmd by using following command
pip install numpy
then it said
"Requirement already satisfied: numpy in
c:\users\ranjit\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
(1.21.3)"
but when i typed the following code in idle
import numpy
arr = numpy.array([1, 2, 3, 4, 5])
print(arr)
and run the code the following error occured
Traceback (most recent call last):
File "C:\Users\Ranjit\AppData\Local\Programs\Python\Python310\w3.py", line 1, in <module>
import numpy
ModuleNotFoundError: No module named 'numpy'
why is it showing that no module named numpy even if it is installed?
This question already has answers here:
Package (Python PIL/Pillow) installed but I can't import it
(3 answers)
Closed last year.
E:\python>pyota.py
Traceback (most recent call last):
File "E:\python\pyota.py", line 6, in <module>
import PILLOW
ModuleNotFoundError: No module named 'PILLOW'
E:\python>pip install pillow
Requirement already satisfied: pillow in c:\users\admin\appdata\local\programs\python\python310\lib\site-packages (9.0.0)
Even if I used 'pillow' it didn't work:
Traceback (most recent call last):
File "E:\python\pyota.py", line 6, in <module>
import pillow
ModuleNotFoundError: No module named 'pillow'
The download module is called "pillow", but the import is PIL (Python Imaging Library). Pillow was forked from PIL as a clone, and was improved so much that it has replaced it.
from PIL import Image
or
import PIL
import numpy as np
Traceback (most recent call last):
File "C:\Users\xil15102\Documents\example.py", line 1, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
I used command prompt to install numpy already!
c:\>pip install numpy
Requirement already satisfied: numpy in c:\python27\arcgis10.6\lib\site-packages (1.9.3)
I also added a path to my scripts folder for python27 as well.
I'm using Python 3.6.3 on Windows 10 and Quandl module in my pip list, but I get the following error:
import quandl
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import quandl
File "C:\Users\Kamal\AppData\Local\Programs\Python\Python36-32\lib\quandl\__init__.py", line 3, in <module>
from .api_config import ApiConfig
ModuleNotFoundError: No module named 'quandl.api_config'
Try pip3 install quandl. If you have python2 installed, there may be a mismatch in symlinks related to pip.
I have installed matplotlib from
http://matplotlib.org/downloads.html
I tried to get to the first step
c:\Python34\Scripts>py Example_01.py
Traceback (most recent call last):
File "Example_01.py", line 2, in <module>
import matplotlib.pyplot as plt
File "C:\Python34\lib\site-packages\matplotlib\__init__.py", line 105, in <mod
ule>
import six
ImportError: No module named 'six'
Using this site, I found advice that I should run setup.py. I found versions of setup.py in C:\Python34\Lib\site-packages\numpy but not in C:\Python34\Lib\site-packages\matplotlib.
So, my question would be:
Should I have a setup.py in the site-packages\matplotlib
Should there be a separate setup.py for each site package?
How would Python know which to run...both numpy and matplotlib can be imports.