0
I have Python installed on my Pcs (Windows 7 and 8) but I can’t run any script that contains import
.
Error message always appears:
import error: no module named xxxx.
0
I have Python installed on my Pcs (Windows 7 and 8) but I can’t run any script that contains import
.
Error message always appears:
import error: no module named xxxx.
2
You are trying to import modules that do not come "embedded" when you install Python. That means you will have to install them manually.
You can do this by Pip
pip install numpy
Or however you choose.
This response works for many of the modules but the installation of the numpy
in Windows is usually much more boring.
I never did this installation on Windows, but apparently AP had no problems... Anyway, I will look into that and try to improve that answer (if it is some immutable behavior).
Exactly, sergiopereira. I managed to install nltk easily, but numpy so far nothing... :(
To install numpy on Windows, the easiest is to download already precompiled here and install the wheel file using something like pip install numpy‑1.9.3+mkl‑cp35‑none‑win_amd64.whl
. Be careful to download the correct version for your Windows (32 vs 64bit) and Python (2.7 vs 3.x)
Long overdue, but never too late to mourn: @sergiopereira, thank you very much! :)
Browser other questions tagged python python-3.x python-2.7 importing
You are not signed in. Login or sign up in order to post.
What version of Python is installed? You have tried removing Python and installing it again?
– Fábio Jânio
Surely the imported module is correctly installed or is one of the modules that comes by default with python?
– Rui Lima
Hi, thanks for the answers!!! So, I have the 2.7 on one pc and the 3.5 on the other. I have installed and re-installed a thousand times and it doesn’t work :(
– pitanga
How can I know if the module is well installed, Rui? (if it is not too difficult to explain)
– pitanga
@Jana what module are you trying to import?
– Rui Lima
This one is one of many that don’t work: import numpy
– pitanga
I just tried some modules and they work: >> import os >> import shutil >> import glob
– pitanga
@Jana because these come by default with python
– Rui Lima
Thank you so much, Rui!
– pitanga
@Jana to use numpy you need to install the package first
– Rui Lima
Fabio, Rui e jbueno, super thanks for the answers!!! And I’m sorry I misposed the question. I’m already trying to solve from the answers. An embrace!
– pitanga
@Jana if your operating system is 64 bits you may have some difficulty installing numpy for windows, but I think it is possible.
– Rui Lima