[Tutor] Installing python and numpy on the Mac (OSX)

2017-12-23 Thread Peter Hodges
Hi. I downloaded Python 3.6 from the python site, then followed online 
directions for pip to install numpy (in users? —user was in the example).
When I start IDLE in the Python 3.6 in Applications and then type import numpy 
as np I get the following:
import numpy as np
Traceback (most recent call last):
  File "", line 1, in 
import numpy as np
ModuleNotFoundError: No module named ‘numpy'

Does this mean I need to set the $PATH with some new pathname?
Or move the numpy directory into the python 3.6 directory?
Or?

Thanks for any help,
Peter
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Installing python and numpy on the Mac (OSX)

2017-12-23 Thread Albert-Jan Roskam

Op 23 dec. 2017 09:47 schreef Peter Hodges :
>
> Hi. I downloaded Python 3.6 from the python site, then followed online 
> directions for pip to install numpy (in users? —user was in the example).
> When I start IDLE in the Python 3.6 in Applications and then type import 
> numpy as np I get the following:
> import numpy as np
> Traceback (most recent call last):
>   File "", line 1, in 
> import numpy as np
> ModuleNotFoundError: No module named ‘numpy'
>
> Does this mean I need to set the $PATH with some new pathname?
> Or move the numpy directory into the python 3.6 directory?
> Or?

Hi,

Perhaps you installed numpy for Python 2? What do you get when you type "python 
--version"? You could use virtualenv and use python 3 there (with -p), then pip 
install numpy in that virtualenv.

Or, do (without sufficient rights):
python3.6 $(which pip) install numpy

Untested (I don't own a Mac)
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Problem in python online class

2017-12-23 Thread Albert-Jan Roskam

On Dec 21, 2017 09:58, Tim Cordsen via Tutor  wrote:
>
> Hello everybody,
> I am doing a python online class and I am lost. The "teacher" is a little
> chaotic and doesn't provide his code, so everyone must type on their own.
>
> Now the class reached a point where I am lost. It is about doing a simple
> web frontend with a form and saving the data of the form to mongodb.
>
> I have the form, but can't see the result in the console. Also there is
> nothing in mongodb after submitting.
>
> Is anybody willing to check my code and tell me where is my mistake?
>
> I am quite new to python, but not new to programming. I am
> mainframe-Cobol-programmer, so the basics of programming are known by me.

What framework are you using? Can you post the code of your web template, your 
view function, your form and your model? Have you tried using the pdb debugger 
(import pdb;pdb.set_trace())?
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Installing python and numpy on the Mac (OSX)

2017-12-23 Thread Albert-Jan Roskam

Op 23 dec. 2017 09:47 schreef Peter Hodges :
>
> Hi. I downloaded Python 3.6 from the python site, then followed online 
> directions for pip to install numpy (in users? —user was in the example).
> When I start IDLE in the Python 3.6 in Applications and then type import 
> numpy as np I get the following:
> import numpy as np
> Traceback (most recent call last):
>   File "", line 1, in 
> import numpy as np
> ModuleNotFoundError: No module named ‘numpy'
>
> Does this mean I need to set the $PATH with some new pathname?
> Or move the numpy directory into the python 3.6 directory?
> Or?

Or perhaps even easier: https://conda.io/docs/user-guide/install/download.html
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor