holzschu / Carnets

Carnets is a stand-alone Jupyter notebook server and client. Edit your notebooks on the go, even where there is no network.
https://holzschu.github.io/Carnets_Jupyter/
BSD 3-Clause "New" or "Revised" License
567 stars 34 forks source link

`!pip install geopandas` causes error loop #202

Open CoryLR opened 3 years ago

CoryLR commented 3 years ago

I am using Carnets Plus for iOS. I tried to pip install geopandas as shown in the title, but it hangs for a moment and then goes into an error loop. Here's the first chunk of output before it starts looping:

Defaulting to user installation because normal site-packages is not writeable Collecting geopandas Using cached geopandas-0.10.2-py2.py3-none-any.whl (1.0 MB) Requirement already satisfied: pandas>=0.25.0 in /private/var/containers/Bundle/Application/59C33F93-129D-43BC-B57F-3028CC61C2B1/Carnets-sci.app/Library/lib/python3.9/site-packages (from geopandas) (1.2.4) Collecting fiona>=1.8 Using cached Fiona-1.8.20.tar.gz (1.3 MB)

ERROR: Command errored out with exit status 120:
 command: /private/var/containers/Bundle/Application/59C33F93-129D-43BC-B57F-3028CC61C2B1/Carnets-sci.app/Library/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/mobile/Containers/Data/Application/615E9A8C-0CED-409B-8413-574412F4C136/tmp/pip-install-si8dljxa/fiona_11b60d8f041a4df98df72aa76d7b23bd/setup.py'"'"'; __file__='"'"'/private/var/mobile/Containers/Data/Application/615E9A8C-0CED-409B-8413-574412F4C136/tmp/pip-install-si8dljxa/fiona_11b60d8f041a4df98df72aa76d7b23bd/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/mobile/Containers/Data/Application/615E9A8C-0CED-409B-8413-574412F4C136/tmp/pip-pip-egg-info-iimb4uem
     cwd: /private/var/mobile/Containers/Data/Application/615E9A8C-0CED-409B-8413-574412F4C136/tmp/pip-install-si8dljxa/fiona_11b60d8f041a4df98df72aa76d7b23bd/
Complete output (1 lines):
gdal-config: command not found
----------------------------------------

WARNING: Discarding https://files.pythonhosted.org/packages/ec/f7/093890341a7e8fbfcdfa04caf4dfb588ebab32c13ceaa6a3819da79ea106/Fiona-1.8.20.tar.gz#sha256=a70502d2857b82f749c09cb0dea3726787747933a2a1599b5ab787d74e3c143b (from https://pypi.org/simple/fiona/). Command errored out with exit status 120: python setup.py egg_info Check the logs for full command output.

Using cached Fiona-1.8.19.tar.gz (1.3 MB)

holzschu commented 3 years ago

So, I've got bad news and I've got good news.

The bad news is that geopandas has some C components and dependencies (libproj, libgdal, libgeos, pyproj, pygeos, Fiona...) so it cannot be installed by the user (since there are no C compilers available on iOS)

The good news is that it can be installed as part of the app. The latest TestFlight version has geopandas (and a load of other packages that work with it): https://testflight.apple.com/join/UbNIjkjp

It should be part of the next AppStore release, too (this TestFlight version is the version I submitted to the AppStore, since the bugs seem to be solved).

holzschu commented 3 years ago

Update: the AppStore version has geopandas now (both Carnets and Carnets-Plus).