NumPy not available? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: NumPy not available? (/thread-28731.html) |
NumPy not available? - Mark17 - Aug-01-2020 import numpy as npgives Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import NumPy as np ModuleNotFoundError: No module named 'NumPy' in my Python 3.7.4 Shell. How can I make that available? Thanks! RE: NumPy not available? - metulburr - Aug-01-2020 (Aug-01-2020, 10:51 AM)Mark17 Wrote:No camelcase. Type it out without any caps as you have in the codebox on this post.import NumPy as np ModuleNotFoundError: No module named 'NumPy' RE: NumPy not available? - Mark17 - Aug-01-2020 Same result with numpy or NumPy. Is it possible that I don't have it downloaded onto my hard drive at all? I've never tried using it before. RE: NumPy not available? - ndc85430 - Aug-01-2020 Have you installed it? Did you install it for this version of Python? Are you using a virtual environment? Basically: more details about your setup please RE: NumPy not available? - Mark17 - Aug-01-2020 (Aug-01-2020, 11:45 AM)ndc85430 Wrote: Have you installed it? Did you install it for this version of Python? Are you using a virtual environment? Basically: more details about your setup please I have Python Shell 3.7.4 installed. I don't think I installed any packages with that because I started with an intro class online that didn't use them. This morning, I installed Anaconda3 (thinking maybe this could solve the problem). That's in my Users directory. Python is also in Users but it's several subfolders in (I'm running Windows 10). Hmmm. When I try the Python app from the Anaconda install, "import numpy as np" gives a long error message with a link at the bottom for troubleshooting. I'll take a look at that and report back. The error message tells me to install mkl-service package from http://github.com/IntelPython/mkl-service . Should I try to download that? Near the bottom of the error text, it says: Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found. RE: NumPy not available? - snippsat - Aug-01-2020 (Aug-01-2020, 06:22 PM)Mark17 Wrote: his morning, I installed Anaconda3 (thinking maybe this could solve the problem).You most activate (base) eg trough Anaconda PromptLong Thread here where talk about Anaconda and versions from python.org For version from python.org Python 3.8 (3.6-3.7) and pip installation under Windows Anaconda3 do of course comes with numpy,here manual activate of base. G:\Anaconda3\Scripts λ activate # See (base) (base) G:\Anaconda3\Scripts λ pip -V pip 20.0.2 from G:\Anaconda3\lib\site-packages\pip (python 3.7) # conda most know about,the pip of Anaconda (base) G:\Anaconda3\Scripts λ conda -V conda 4.8.3 (base) G:\Anaconda3\Scripts λ python Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> >>> np.__version__ '1.16.2' >>> exit() (base) G:\Anaconda3\Scripts λ deactivate G:\Anaconda3\Scripts λ cd .. G:\Anaconda3 λ cd .. # Out of Anaconda G:\ λ python -V Python 3.8.3 G:\ λ pip -V pip 20.2 from c:\python38\lib\site-packages\pip (python 3.8) RE: NumPy not available? - Mark17 - Aug-01-2020 (Aug-01-2020, 07:42 PM)snippsat Wrote:(Aug-01-2020, 06:22 PM)Mark17 Wrote: his morning, I installed Anaconda3 (thinking maybe this could solve the problem).You most activate What exactly do I do with that code? RE: NumPy not available? - snippsat - Aug-01-2020 (Aug-01-2020, 08:16 PM)Mark17 Wrote: What exactly do I do with that code?What do you mean? You know that you get shortcut to Anaconda Prompt, Navigator, NoteBook, ect when install Anaconda3? RE: NumPy not available? - Mark17 - Aug-01-2020 (Aug-01-2020, 08:46 PM)snippsat Wrote:(Aug-01-2020, 08:16 PM)Mark17 Wrote: What exactly do I do with that code?What do you mean? I think the problem is solved now, actually. I can import numpy and entering np.array([1,2,3])returned array([1,2,3])Should I uninstall the previous Python Shell I had installed (3.7)? I'm guessing what worked here is when you directed me to the Navigator and I opened the CMD.exe prompt from there. The first line showed up as "(base) C:\Users\ <my root directory>. I'm able to import numpy, pandas, and math without incident. Thank you very much! |