Installation instructions
martinfleis opened this issue · 10 comments
Hi,
this is a part of pyOpenSci/software-submission#18.
Naive installation
As a naive user, if I make a new python environment and do pip install movingpandas, the installation fails on Mac.
Collecting movingpandas
Downloading movingpandas-0.2rc1.tar.gz (20 kB)
Collecting numpy
Downloading numpy-1.18.1-cp38-cp38-macosx_10_9_x86_64.whl (15.2 MB)
|████████████████████████████████| 15.2 MB 5.2 MB/s
Collecting matplotlib
Downloading matplotlib-3.1.2-cp38-cp38-macosx_10_9_x86_64.whl (13.2 MB)
|████████████████████████████████| 13.2 MB 4.1 MB/s
Collecting shapely
Using cached Shapely-1.6.4.post2.tar.gz (225 kB)
Collecting pandas
Using cached pandas-0.25.3-cp38-cp38-macosx_10_9_x86_64.whl (10.3 MB)
Collecting geopandas
Using cached geopandas-0.6.2-py2.py3-none-any.whl (919 kB)
Collecting hvplot
Downloading hvplot-0.5.2-py2.py3-none-any.whl (2.5 MB)
|████████████████████████████████| 2.5 MB 4.5 MB/s
Collecting cartopy
Using cached Cartopy-0.17.0.tar.gz (8.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /Users/martin/anaconda3/envs/movingpandas/bin/python /Users/martin/anaconda3/envs/movingpandas/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/d0/qyf0yvzd0n9ctn2wr3r4l1vw0000gn/T/tmpcf10m5i7
cwd: /private/var/folders/d0/qyf0yvzd0n9ctn2wr3r4l1vw0000gn/T/pip-install-9up68k4a/cartopy
Complete output (1 lines):
Proj 4.9.0 must be installed in Conda environment "movingpandas".
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/martin/anaconda3/envs/movingpandas/bin/python /Users/martin/anaconda3/envs/movingpandas/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/d0/qyf0yvzd0n9ctn2wr3r4l1vw0000gn/T/tmpcf10m5i7 Check the logs for full command output.
Using conda install -c anitagraser movingpandas works, but you'll get a mixture of channels (conda-forge and defaults), which is known to cause issues. Moreover, you get geopandas from defaults in older version that is on conda-forge.
It is worth documenting possible issues and workarounds (strict channel priority) as the default installation instructions do not follow GeoPandas recommendations.
Dev installation
Current dev installation instructions expect using Anaconda. I'd say that most dev people will just make a new environment using conda env create -f environment.yml, but it has to be derived from the Aanconda instructions. I'd just add a sentence saying that dev env should use environment.yml and keep Anaconda instructions as one of the options only.
Minor question - conda installs movingpandas 0.1.dev2, while the review issue says Version submitted: 0.2. Should I assume that 0.2 will be released after the review?
Thank you for doing this review @martinfleis!
Ad Naive installation
Yes, pip install will also fail on Windows. My understanding is that it is not possible to pip install all GeoPandas dependencies and therefore MovingPandas suffers the same fate. I'll add Mac to the paragraph that warns Windows users.
I'll look into the channel issue. Can you please point me towards the GeoPandas recommendations that you've mentioned?
Ad Dev installation
I'll change the Readme accordingly.
Ad Version in conda-forge
I'll try to get the 0.2 (noarch) release into conda-forge this weekend.
- Mac pip warning 01417e5
- Channel issue 44dcca7
- Dev installation instructions 01417e5 & ae257ca
- v0.2 release on conda-forge https://anaconda.org/conda-forge/movingpandas
My understanding is that it is not possible to pip install all GeoPandas dependencies
That is true, it takes a lot of manual effort to do it.
I'll look into the channel issue. Can you please point me towards the GeoPandas recommendations that you've mentioned?
See the note in here: https://geopandas.readthedocs.io/en/latest/install.html#using-the-conda-forge-channel
I've just realised that it is not clear that movingpandas is available on conda-forge. It might be worth it adding conda install -c conda-forge movingpandas next to pip install and keep it as recommended way of installation. That way most of people will succeed installation on the first try.
It might be worth it adding conda install -c conda-forge movingpandas next to pip install and keep it as recommended way of installation.
Fixed in c84e9c0
you'll get a mixture of channels (conda-forge and defaults), which is known to cause issues. Moreover, you get geopandas from defaults in older version that is on conda-forge.
Based on your comment, I've removed defaults from the environment. However, I've run into issues on Windows: basically, importing geopandas fails because gdal imports fail.
conda-forge/gdal-feedstock#269 (comment) states that
On Windows, because conda-forge relies on some package built with defaults blas (like scipy) one must use the defaults channel on top of conda-forge and activate conda's new strict channel feature. ... Note that on Linux and OS X we recommend the opposite order of channels.
So, I guess I'll have to add a win-environment.yml and/or add specific instructions to the README. Is there any commonly used approach for handling this kind of issues?
Is there any commonly used approach for how to handle this kind of issues?
I was not even aware of this Windows issue as macOS/Ubuntu user. We should probably refer to is in geopandas docs as well.
I'd say putting the content of that comment would be a good way of dealing with it.
I've added all the install details I'm aware of 9440ba1
Hi @martinfleis. Trying to clean loose ends in this review. It looks like @anitagraser has indicated that this issue has been addressed (and you indicated a thumbs up :). Can this issue be closed?
@jlpalomino I guess so, I am fine with the current solution. I'll close it and @anitagraser can reopen if needed.
Again thanks for confirming @martinfleis!