Hi , I have an issue python doesn’t import numpy and cv2 it doesn’t show any errors but it exits, pls help me I have tryed deleting everything related to python and reinstall it but the same problem is, help me please I am urgent.
pip3 list --format=columns in a terminal to check.
The above could be system dependent mind. What system are you using?
Yes it’s installed, I have check it
Okay, so what error are you seeing when you run
import numpy as np?
What makes me confused that no error is shown , and the lines after import numpy as np don’t work , you should know that before a window was shown to me tells that I should check my numpy installation, then I have searched on YouTube for a solution and I founded some one who suggested to use Registy editor and delete some files I did so and the error window didn’t appear more but python doesn’t read the next code .
Maybe post an example of your code, if you’d like me (or anyone else) to check that the code works on another system. If your code passes that test, then you’ve an issue with the Python installation, in which case I will side-line, as I don’t use a MS Windows system.
the code is just
import numpy as np
as you see even in the terminal its exit python.
Okay, well I know that will work on my system without even trying it.
What do you see if you run:
import numpy as np print(np.__version__)
edit to add…
Run your scripts in an IDE, such as
No thing is different it doesn’t do the code after import numpy as np
Okay, well my best guess is that you have a issue with the Python installation, so (as I’ve said) here’s where I side-line, but I don’t think that anything short of re-installing Python is going to move you forward, but I may be wrong, and I re-install may not be needed: see what others have a say on this topic.
Thanks for you
One last thought I just had: you could try an uninstall/install on the
numpy package and see if that fixes the issue.
I notice that you’re using a 32-bit version of Python. Is the version of numpy also 32-bit or is it 64-bit?
But how do I check that
Did you import numpy using
py -m pip install numpy or something similar? If yes, then it should be the correct version.
I have installed py pip