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 Pyepgem

    Pythonista
    pyephem
    4
    4
    2831
    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.
    • powersim
      powersim last edited by

      Hello,

      I’m using in my normal python envoirment pyephem, to calculate positions of planets and sattelites.
      This is a great missing in this envoirment.
      Is there a way to import this pyephem library?

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

        https://github.com/brandon-rhodes/pyephem click on the colored bar that is just above "Branch: master, New pull request". You will see there that this repo is ~73% C code and ~4% Python code. Apple's iOS guidelines make it difficult for Pythonista to support such an app. If a repo is "pure Python" then you have a fighting change to make them work but when they are largely non-Python, odds are low.

        1 Reply Last reply Reply Quote 0
        • Matteo
          Matteo @powersim last edited by

          @powersim Hi, have you tried to install it via 'pip install pyephem' with StaSh? To install StaSh, if not installed in Pythonista you use, run the following code:

          import requests as r; exec(r.get('http://bit.ly/get-stash').text)
          

          then run the file 'launch_stash.py' installed in the main folder of Pythonista and use pip in the shell.

          If the library you are installing depends on not pure python codes like C or Fortran, no way to use it in Pythonista, but if it needs only pure python libraries, the command pip in StaSh works like the one in computer, it installs all the needed dependencies.

          The only solution I have in mind to run not pure python libraries with Pythonista is to use a remote python server by adding to a python temporary directory of the server the precompiled library you want, according to the os of the python server (Linux, Windows, ...), and by changing the python sys path so the remote python server can find in the temporary folder all it needs to run your scripts based on precompiled library. Not very comfortable because it is slow (it must download a full precompiled lib every time during independent sessions) but it works.

          Regards

          1 Reply Last reply Reply Quote 0
          • georg.viehoever
            georg.viehoever last edited by

            Maybe try skyfield, which is pure Python https://github.com/skyfielders/python-skyfield .

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