omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    5
    14
    20275
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ccc
      ccc last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • karthikmaiya
        karthikmaiya last edited by

        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

        1 Reply Last reply Reply Quote 0
        • ccc
          ccc last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • karthikmaiya
            karthikmaiya last edited by

            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

            1 Reply Last reply Reply Quote 0
            • karthikmaiya
              karthikmaiya last edited by

              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?

              1 Reply Last reply Reply Quote 0
              • karthikmaiya
                karthikmaiya last edited by

                All i see when i run this code snippet is a folder called pypi-modules that contains one file called xmlrpclib

                1 Reply Last reply Reply Quote 0
                • ccc
                  ccc last edited by

                  Use Shellista to gunzip and the untar numpy-1.8.tar.gz.

                  1 Reply Last reply Reply Quote 0
                  • omz
                    omz last edited by

                    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).

                    1 Reply Last reply Reply Quote 0
                    • karthikmaiya
                      karthikmaiya last edited by

                      Is it possible such that the update will allow us to add non-python modules ourself or is that an extremely involved process?

                      1 Reply Last reply Reply Quote 0
                      • karthikmaiya
                        karthikmaiya last edited by

                        And also how exactly does one use shellista to gunzip or untar a tar.gz file. Can someone show me an example code snippet

                        1 Reply Last reply Reply Quote 0
                        • Rothrock42
                          Rothrock42 last edited by

                          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?

                          1 Reply Last reply Reply Quote 0
                          • Rothrock42
                            Rothrock42 last edited by

                            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.

                            1 Reply Last reply Reply Quote 0
                            • JonB
                              JonB last edited by

                              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.

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Powered by NodeBB Forums | Contributors