Shapely doesn't currently have any binary wheels for Windows on PyPI. I'm not so lucky and have to use it at work. I've been playing around with AppVeyor recently for another project and think it wouldn't be difficult to get it to run tests in the way Travis does for us now on Linux, and also to produce binary wheels as artifacts. @pelson already has it working with conda (https://anaconda.org/scitools/shapely) so it shouldn't be much more effort to produce a wheel. @sgillies If I set this up can you upload the results?
@snorfalorpagus yes. I could also give you perms to upload to PyPI if you're willing.
If you want to see how the AppVeyor Shapely binary is built, take a look at https://github.com/conda-forge/shapely-feedstock. Indeed, if either of you wanted to have merge rights on that repo there is a recipe-maintainers section which I'd happily merge a PR with your names on it: https://github.com/conda-forge/shapely-feedstock/blob/master/recipe/meta.yaml#L40.
I would also love this, especially if that means it comes with a matching GEOS DLL. Any progress here?
For some time I was building Shapely binaries manually and uploading them to PyPI. I stopped doing that once I lost my Windows build environment and started a new job. I now have a Windows environment again and I would be happy to do a manual build and upload the current release to PyPI.
Some months ago I saw this issue and began playing around with AppVeyor. I made some progress, and I may have time again to continue if nobody wants to take on this issue.
Fiona has an AppVeyor build that produces wheel artifacts including the required DLLs. We should be able to use this as a template for Shapely.
I'd like to voice support for this as well! pip install shapely
really needs to just work.
If it's possible for pip to work after installing GEOS, then a straightforward set of GEOS install instructions in the shapely installation docs would be helpful.
I was recently having some issues with Conda environments not playing well with pip and so I tried switching to just using pip only and Shapely was one of the libraries that reminded me why I had switched to conda. For a pip process to work my only easy-ish option is to get the wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs/ as recommended in the shapely docs. I'd love to be able to standardize my team at work to use a single version controlled environment file like a requirements.txt or environment.yml, but issues like this make it harder to rely on PyPI.
@sgillies Could you add Shapely to your appveyor account as has been done for Fiona?
Maybe! I'm a little short on time through May, but will make a note.
Related: https://hynek.me/articles/simple-python-azure-pipelines/ is a neat post.
Eg scikit-learn uses appveyor next to multibuild in their scikit-learn-wheels repo: https://github.com/MacPython/scikit-learn-wheels (similar to the fiona-wheels repo I think), so that could also be an approach to copy.
We would really need to have Windows wheels otherwise we cannot use Shapely https://github.com/biolab/orange3-bioinformatics/issues/152. How can I help to make Windows wheels available?
In the meantime of somebody figuring out a appveyor/github actions/ ... solution, it might also be an option for the current release to upload Christoph Gohlke's wheels for windows? (if that has his permission, of course, cc @cgohlke)
I'm very keen to see this resolved, as I see several projects that would like to depend on shapely, but are hesitant due to lack of native Windows abilities to simply do: pip install shapely
However, I'm new to both AppVeyor and Azure Pipelines, and am unsure where to direct efforts. I had a play with AppVeyor, and it successfully creates .whl
files, which is a good start. But it seems that many projects are currently migrating to Azure Pipelines, but I'm unsure why. Any incites from folks that have used these services is welcome!
Ping to anyone following this issue.
After nearly 4 years, we finally have beta Windows binary wheels to test! From a Windows non-anaconda prompt with regular Python on the PATH, install the beta package using:
python3 -m venv venv
venv\Scripts\activate.bat
python -m pip install shapely==1.7b1
And test them:
python -c "import shapely; print(shapely.__version__)"
python -c "from shapely.geos import geos_version_string; print(geos_version_string)"
python -c "from shapely import speedups; assert speedups.enabled"
Follow #818 for any feedback or issues. If none, we may release 1.7.0 tomorrow.
Also note that Window binary wheels are not available for Python 2.7, as these are too low priority.
After this, the regular way to install shapely should just be pip install shapely
.
(Conda folks will still probably want to use conda install shapely
)
Most helpful comment
I'd like to voice support for this as well!
pip install shapely
really needs to just work.If it's possible for pip to work after installing GEOS, then a straightforward set of GEOS install instructions in the shapely installation docs would be helpful.
I was recently having some issues with Conda environments not playing well with pip and so I tried switching to just using pip only and Shapely was one of the libraries that reminded me why I had switched to conda. For a pip process to work my only easy-ish option is to get the wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs/ as recommended in the shapely docs. I'd love to be able to standardize my team at work to use a single version controlled environment file like a requirements.txt or environment.yml, but issues like this make it harder to rely on PyPI.