Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ep. 11: Issues with numpy #756

Open
dakane1 opened this issue Nov 15, 2019 · 4 comments
Open

Ep. 11: Issues with numpy #756

dakane1 opened this issue Nov 15, 2019 · 4 comments

Comments

@dakane1
Copy link

dakane1 commented Nov 15, 2019

I was attempting to teach episode 11 and ran into this error with: $ python ../code/readings_04.py --mean inflammation-01.csv and I get:

$python readings_04.py --mean ../data/inflammation-01.csv
Traceback (most recent call last):
File "readings_04.py", line 2, in
import numpy
ImportError: No module named numpy

I have googled and read stackoverflow but can't figure out what is going wrong...never seen this before.

@ldko
Copy link
Contributor

ldko commented Nov 18, 2019

HI @dakane1 . It looks possible that the version/instance of Python you are running at the commandline does not have numpy installed. Were you able to use import numpy in Jupyter Notebook? It could be the system Python you are using at that prompt is different than the one that Jupyter Notebook is using and does not have numpy installed.

@dakane1
Copy link
Author

dakane1 commented Nov 18, 2019

Hmm, yes it worked fine in Jupyter Notebook. I will do some testing to see what my command line is set to. Thanks for pointing me in a direction to investigate further :-).

@maxim-belkin
Copy link
Contributor

maxim-belkin commented Nov 18, 2019

I think the second scenario that Lauren described is what is happening here: there is a good chance that you used system's Python when you tried executing the script with python.

I think we should add a callout box the first time we try to execute a Python script. What do you all think?

@ldko
Copy link
Contributor

ldko commented Nov 18, 2019

@maxim-belkin I think adding a callout box would be helpful to many users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants