Python Forum
AttributeError: module 'numpy' has no attribute 'array
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AttributeError: module 'numpy' has no attribute 'array
#7
(May-26-2019, 10:54 AM)aapurdel Wrote: I solved it! I had to install numpy properly. https://solarianprogrammer.com/2017/02/2...3-windows/
The tutorial is ok,but there is is one redirection that is not needed.
python -m pip install numpy
# Only this is needed
pip install numpy
pip should work from anywhere in cmd/cmder.
# Check pip
C:\
λ pip -V
pip 19.1.1 from c:\python37\lib\site-packages\pip (python 3.7)

# Install
C:\
λ pip install numpy
Collecting numpy
  Downloading ... numpy-1.16.3-cp37-cp37m-win32.whl (10.0MB)
     |████████████████████████████████| 10.0MB 297kB/s
Installing collected packages: numpy
Successfully installed numpy-1.16.3

# Test that it work
C:\
λ python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>>
>>> numpy.__version__
'1.16.3'
>>> exit()
Python 3.6/3.7 and pip installation under Windows
Reply


Messages In This Thread
RE: AttributeError: module 'numpy' has no attribute 'array - by snippsat - May-26-2019, 11:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Numpy] How to store different data type in one numpy array? water 7 711 Mar-26-2024, 02:18 PM
Last Post: snippsat
  reshaping 2D numpy array paul18fr 3 1,049 Jan-03-2023, 06:45 PM
Last Post: paul18fr
  Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'" kalle 2 2,675 Jul-19-2022, 06:31 AM
Last Post: paul18fr
  Numpy array BrianPA 13 5,033 Jan-23-2021, 09:36 AM
Last Post: Serafim
  How to fill datetime64 field in numpy structured array? AlekseyPython 0 2,308 Oct-20-2020, 08:17 AM
Last Post: AlekseyPython
  Adding data in 3D array from 2D numpy array asmasattar 0 2,252 Jul-23-2020, 10:55 AM
Last Post: asmasattar
  converting dataframe to int numpy array glennford49 1 2,346 Apr-04-2020, 06:15 AM
Last Post: snippsat
  Replacing sub array in Numpy array ThemePark 5 4,235 Apr-01-2020, 01:16 PM
Last Post: ThemePark
  How to prepare a NumPy array which include float type array elements subhash 0 1,944 Mar-02-2020, 06:46 AM
Last Post: subhash
  numpy.where array search for string in just one coordinate adetheheat 1 2,311 Jan-09-2020, 07:09 PM
Last Post: paul18fr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020