Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help installing NumPy
#1
I am using PyCharm as my editor. I want to install NumPy. I found the file, but I do not know where/how to install it?
Reply
#2
Did you try using the built-in python package manager, pip? pip install numpy should work fine.
Reply
#3
Thanks.
I just tried that. I typed it into the Python shell and I get the following:
>>> pip install numpy
SyntaxError: invalid syntax
>>>
I am using Python 3.6.1 and Windows 10 operating system.
Reply
#4
Try it at your command line, instead of at the interactive python interpreter. If you're in Windows 10, open the start menu and type cmd, and then run it in there.
Reply
#5
Not from interactive shell,as mention it's from(cmd).
Here how it should work,if not work like this look at Python 3.6 and pip installation under Windows.
C:\
# Check Python
λ python -V
Python 3.6.4

# Check pip
C:\
λ pip -V
pip 9.0.1 from c:\python36\lib\site-packages (python 3.6)

# Install numpy
C:\
λ pip install numpy
Collecting numpy
  Downloading numpy-1.14.0-cp36-none-win32.whl (9.8MB)
    100% |████████████████████████████████| 9.8MB 83kB/s
Installing collected packages: numpy
Successfully installed numpy-1.14.0

# Test that it work
C:\
λ python
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__version__
'1.14.0'
>>> exit()

C:\
Reply
#6
Thanks,
Yes, the cmd worked from the scripts directory. It indicated that numpy was all ready installed, which is correct. The real problem I am having is PyCharm doesn't recognize numpy. I keep getting the following error using PyCharm:
File "C:/Users/larry/PycharmProjects/PProject1/BJ rev E.py", line 14, in <module>
import numpy as np # Inport number program
ModuleNotFoundError: No module named 'numpy'

If I run the program from Python it works OK, but PYCharm gives the error.
Reply
#7
Configuring Python Interpreter to point to 3.6.
Reply
#8
Thanks Snippsat. But I think Configuring Python virtual environment is well beyond my capabilities. The first instruction is "In the Settings/Preferences dialog, click Project Interpreter. I don't know where the Settings command/Preferences is?

I downloaded again PyCharm, this time to the Python directory. Still doesn't recognize numpy. I would remove the numpy commands from my very large program--but there are many of them.

I can't believe this seemingly simple issue can be this difficult????????????

Still looking for a reasonable simple solution.

Larry
Reply
#9
(Feb-20-2018, 12:15 AM)Larry Wrote: ut I think Configuring Python virtual environment is well beyond my capabilities. The first instruction is "In the Settings/Preferences dialog, click Project Interpreter. I don't know where the Settings command/Preferences is?
Scroll down the the doc link has Configuring a local interpreter and Viewing the list of available interpreters.
Reply
#10
I think it would just be simpler to download numpy to the correct place--if I could find the correct place?? Any suggestions?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Numpy] How to store different data type in one numpy array? water 7 551 Mar-26-2024, 02:18 PM
Last Post: snippsat
  Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'" kalle 2 2,607 Jul-19-2022, 06:31 AM
Last Post: paul18fr
  trouble installing numpy GloryHoleLover 3 2,247 Mar-29-2020, 06:35 AM
Last Post: ndc85430
  Error installing numpy srm 3 3,522 Jul-08-2019, 06:26 PM
Last Post: srm
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 2,982 Apr-09-2019, 04:54 PM
Last Post: PhysChem

Forum Jump:

User Panel Messages

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