import numpy fails
worked yesterday (day 2 using Pythonista)... getting an error ... ImportError: cannot import name add_newdocs
The general configuration doesn't allow to check site packages like on a windows machine (I am lost without a directory browser...noob on iPad)
Any help would be appreciated to ensure that numpy and matplotlib are functional...the reason I bought this program in the first place
The code at http://omz-forums.appspot.com/pythonista/post/6055977640001536 should show that
The code at http://omz-forums.appspot.com/pythonista/post/5868619489607680 should show that
It is unclear why you are trying to
import add_newdocsbut perhaps if you could post some code we could get a better understanding.
I wasn't try to import add_newdocs, I tried
import numpy as np
and it failed
Does the code at http://omz-forums.appspot.com/pythonista/post/6055977640001536 work in your version of Pythonista?
I don't know what was wrong but the problem seems to have self-rectified without any intervention on my part Thanks for providing responses
Just installed pythonista and tried to run the polar plot demo. Am getting "name 'random_sample' is not defined" on "import numpy as np". Error occurs in init.py module line 103.
Pythonista looks like a great system, and the examples that don't reference numpy are working - but I'd really like to use numpy.
Sound mysterious, I am using both using numpy and matlotlib quite regularly. The only things I can say are:
- The polar plot example runs fine for me in both Python enviroments.
What you told us about the exception is a bit confusing since neither numpy nor matplotlib have an init.py file afaik (they have both multiple __init__.py files though)edit: I just realized that you were probably only struggling with the forums markdown interface since your init.py is printed bold (you have to escape the first two underscores:
- The polar plot example does not import anything from
numpy.randomand neither does
I cannot think of anything obvious, I think you will have to describe more precisely (actually copy and paste the full trace of the exception) what you are doing and what is going wrong.
Try force quitting pythonista. Since numpy is a big module, if you ever cancel a script while numpy or matplotlib are in the middle of importing, it is hard to recover
Force quit solved the problem. Thanks to both responders for helping a newbie.