Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help installing NumPy
#11
Firstly. in the command terminal, type PATH you should see something similar to:

Output:
C:\>PATH PATH=C:\Python36\Scripts\;C:\Python36\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\ ....
Note that the two locations "C:\Python36\" and "C:\Python36\Scripts\" must be included within the PATH string. (The actual location will depend on where you installed Python). If they are not there, you must add them. See https://www.computerhope.com/issues/ch000549.htm

In PyCharm in the upper left corner, click on File -> Default Settings -> Project Interpreter. You should see the file location of your python.exe on the right hand side, as well as any installed modules.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#12
(Feb-20-2018, 12:35 AM)Larry Wrote: I think it would just be simpler to download numpy to the correct place--if I could find the correct place?? Any suggestions?
No no it's in the correct place in Python 3.6 as you should use and have tested from cmd,
so read PyCharm Doc again again and point interpreter to 3.6 in PyCharm.
Look at Project Interpreter --> Show all you get a list and choose 3.6 path.
Reply
#13
Large program works fine when using Python. Only when I use PyCharm does PyCharm have trouble finding numpy. I used pip and verified numpy is downloaded. Numpy is located at C:\Python3.6.1\include.
Reply
#14
Well you have something jazzed up, because numpy should be located at "C:\Python3.6.1\Lib\site-packages\"
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#15
I went to Project Interperter and chose 3.6 path. Same issue:

C:\Users\larry\PycharmProjects\PProject1\venv\Scripts\python.exe C:/Users/larry/PycharmProjects/PProject1/test1.py
Traceback (most recent call last):
File "C:\Users\larry\PycharmProjects\PProject1\numpy\__init__.py", line 126, in <module>
from numpy.__config__ import show as show_config
ModuleNotFoundError: No module named 'numpy.__config__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/larry/PycharmProjects/PProject1/test1.py", line 5, in <module>
import numpy as np # Import number program
File "C:\Users\larry\PycharmProjects\PProject1\numpy\__init__.py", line 131, in <module>
raise ImportError(msg)
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.

I think I am making a mess????????????

Well you have something jazzed up, because numpy should be located at "C:\Python3.6.1\Lib\site-packages\"

Sparkz-alot. Near handle! I verified numpy is "also" located in "C:\Python3.6.1\Lib\site-packages\"

Maybe I should remove it from include??????
Reply
#16
Yeah, I think so. If it were me, I would uninstall Python and reinstall following our tutorial https://python-forum.io/Thread-Basic-Par...er-Windows

This will ensure Python is installed and will work correctly. You should then be able to go into PyCharm and select you default interpreter under Default Settings.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#17
I uninstalled PyCharm and Python--and reinstalled them. Then I downloaded numpy. Same issue --can't find numpy module. Giving up for the night. Thanks for all your help--sincerely!
Reply
#18
A car won't run without a key.
PyCharm will not work without an interpreter.
You can re-install until the cows come home, it still won't work without setup.
Here is step by step to set up
  • You will need to know the path to the interpreter that you wish to use, like C:\Ptython3 oe whatever it is
  • Open your project in PyCharm
  • Click on file-->settings this will open a screen which will have a bunch of menu selections on the left, and the Project Interpreter on the right.
  • If you don't see this window on the right:
  • Click menu item (left pane) Project: Your project Name
  • Select Project Interrupter
  • Now near the top you will see Project Interrupter and a text window with a pull down;
  • Click on the pill down and see if your Interrupter is there. If so, click on it, click OK and you're done.
  • If not in the pull down, you have to add it:
  • Click on the gear icon to the right of this box
  • Click add local
  • Click Existing Environment (you will want to eventually use virtual environment, but don't even think about it now)
  • Again look in the pull down and if it's there, select and OK your way out ... you're done
  • If not there, click on ... button to the right, navigate to your interrupter, select and click OK
  • Keep clicking OK until back to the main screen.
  • You're done. Write some code.
Reply
#19
Larz60+,

From Larry almost 80. I spent about 8 hours working on this one issue, unsuccessfully. I did not understand your nicely documented instructions, but I followed them. And PyCharm now sees NumPy and my sizable program works. Thanks for your great knowledge and the time you took to assist me.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Numpy] How to store different data type in one numpy array? water 7 537 Mar-26-2024, 02:18 PM
Last Post: snippsat
  Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'" kalle 2 2,599 Jul-19-2022, 06:31 AM
Last Post: paul18fr
  trouble installing numpy GloryHoleLover 3 2,245 Mar-29-2020, 06:35 AM
Last Post: ndc85430
  Error installing numpy srm 3 3,519 Jul-08-2019, 06:26 PM
Last Post: srm
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 2,976 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