Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Using pipista
-
So im hearing a lot about pipista and its ability to install other modules. I want to install nltk or mathplotlib with pipista. Van someone tell me where to get pipista, and how to put it onto pythonista and how to run it to get libraries from the pypi library
-
The pipista source is at https://gist.github.com/4116558 . Copy it into and empty Pythonista script and save the thread as pipista.
You can not merely run pipista.
Instead, you must use the Pythonista commandline to import it and use it following the example in the first post in this thread: http://omz-forums.appspot.com/pythonista/post/5794924494585856
Pipista is only usable for Pure Python modules (e.g. no C libraries, etc.). Also, all module prerequisites must be installed. Finally, unzip, ungzip, untar, might need to be done by hand with Shellista. It is not for the faint of heart.
Matplotlib will probably be in the next Pythonista (search this Forum for details) so I would advise holding off on that one.
-
I doesnt work, i tried this but i get a no module named pipista error. But i did what you told me create an empty script and copy the code, then i named it pipista.py
-
Name it pipista, not pipista.py... Or Pythonista will store the file pipista.py.py which will make the import fail. To see if this is the case, try import pipista.py.
-
Ah i see yes that does work, but now i am trying to download and install a test library, can someone give me the code to do that for like numpy or something
-
Ok so i got it to work for numpy, but when the code snippet executes it says saved to: numpy-1.8.0.tar.gz where can i find that and do i have to extract it or anything?
-
All i see when i run this code snippet is a folder called pypi-modules that contains one file called xmlrpclib
-
Use Shellista to gunzip and the untar numpy-1.8.tar.gz.
-
Installing numpy this way won't work, you can only add pure Python modules yourself, numpy is mostly written in C (but will be included with the next update).
-
Is it possible such that the update will allow us to add non-python modules ourself or is that an extremely involved process?
-
And also how exactly does one use shellista to gunzip or untar a tar.gz file. Can someone show me an example code snippet
-
Similar to using pipista. Go to https://gist.github.com/pudquick/4139094 and copy the code for shellista. Paste it into a new script in pythonista. Call it 'shellista' (don't include the .py).
Here is where it is different. You run shellista by tapping the run triangle. It will switch over to the console/interpreter window and show a prompt.
You can then type gunzip('path-to-file.tar.gz') and press return. However I'm not quite clear on the path yet. Anybody?
-
hmmm. The first time I tried pipista it told me that it download the .gz file, but when I tried shellista it couldn't find the file. But I tried it again and it worked just great. So not sure what happened.
Anyways. Thank you for all this, it is fantastic.
-
For future generations who find themselves here.. pipista is no longer supported. Active development is happening on stash https://github.com/ywangd/stash, which includes a pip command that is a little more reliable.