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?
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.
@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.
Maybe try skyfield, which is pure Python https://github.com/skyfielders/python-skyfield .