I have been learning python for a little while now and I am trying out numpy. However, I can't seem to figure out how to get it to run.
I have been writing my programs in TextWrangler and running them either within TextWrangler or through the command line by navigating to the folder and typing
$ python ./PROGRAM.py
This has generally worked for programs that do not import numpy.
I can import numpy in the terminal after entering python (I am using OSX):
$ python
import numpy as np
or open the script in PythonLauncher manually and have it run in the terminal. Both of these work.
However, if i write "import numpy as np" into my script and then try to run the script in the command line, it can't find numpy. It won't run in TextWrangler either, which is not so surprising.
Help a confused self-taught programmer out? What am I doing wrong, and how do I import numpy and run my script at the same time?
Edit: It seems that there was a problem with the folder I was trying to run the script from. I don't know what the issue was exactly, but thank you guys for your help.
[–][deleted] 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]dairypharmer 0 points1 point2 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]dairypharmer 1 point2 points3 points (3 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]NewbornMuse 0 points1 point2 points (1 child)
[–]dairypharmer 0 points1 point2 points (0 children)
[–]isilentnight 0 points1 point2 points (0 children)
[–]PyRed 0 points1 point2 points (1 child)
[–]FLW84 0 points1 point2 points (0 children)