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.


    I'm Back. How do I get a clean install of StaSH into pythonista 3.

    Pythonista
    6
    6
    5306
    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.
    • polymerchm
      polymerchm last edited by

      I've been focused on new job. (And hacking Blender with Python 3.5 for 3D printing applications). I got pythonista 3 and want to cleanly install StaSh for migrating code. How to do? Just running the version I have seems to break, even with the shebang-python2 line.

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

        @polymerchm paste this into the pythonista console:
        import requests as r; exec(r.get('http://bit.ly/get-stash').text)
        (Maybe you will need to set the default interpreter to 2.7 first, but the install-script should be python3 compatible.)

        1 Reply Last reply Reply Quote 1
        • dgelessus
          dgelessus last edited by

          Yes, you probably should set the console to Python 2.7 before running the line. There is a Python 3 only branch of stash from the early beta days of Pythonista 3, where only Python 3 was supported. It was never really updated after Pythonista 3 supported both versions. I don't know what the install script does under Python 3, but just in case you should run it under Python 2 so you don't install the outdated Python 3 branch by accident.

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

            The install script works for both Python 2 and 3.

            The program itself runs in Python 2. However **you can still use Python 3 **as the default interpreter thanks to the shebang line for cross-interpreter calls.

            I did start porting the whole program to Python 3 a while back. However it is not completed due to some difficulties in porting some of the command scripts. Plus I am not not very happy of the overall porting. It was too aggressive and tried to use as much as Python 3 features as possible. I now think it is better to be more conservative. When omz adds the possibility to use both 2 and 3 in the same app. I basically discard the last porting. I'll probably try it again at some point. But for now, the program works fine in the new Pythonista.

            1 Reply Last reply Reply Quote 1
            • Killwas
              Killwas last edited by

              StaSH is amazing and I thought it does not bother me if it is running in 2 or 3, but this morning I got this this morning. Do you know how to work around it?

              [~/Documents]$ pip install socli
              Querying PyPI ...
              Downloading package ...
              Opening: https://pypi.python.org/packages/e3/4f/fb978a65127c287c526f323c0ec1543e9cdcc45a51e0eac72300b2d45f18/socli-1.7.zip
              Save as: /private/var/mobile/Containers/Data/Application/B831A9BE-E51D-4ED7-9208-23F82D673659/tmp/socli-1.7.zip (6368 bytes)
                    6368  [100.00%]
              Extracting archive file ...
              Running setup file ...
              Python 2 is not supported...
              
              1 Reply Last reply Reply Quote 0
              • ccc
                ccc last edited by ccc

                this morning I got this this morning.

                Yes. Me too... https://pypi.python.org/pypi/socli makes it clear that this module requires Python3, not Python2. If you are running Pythonista 3 then you can set your default interpreter to 3.5, or add #!python3 at the top of your main script to run it in the 3.5 interpreter.

                import sys
                print(sys.version)  # will tell you which version you are running
                
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Powered by NodeBB Forums | Contributors