spaCy icon indicating copy to clipboard operation
spaCy copied to clipboard

Build spaCy for conda (conda package out of date)

Open honnibal opened this issue 11 years ago • 11 comments

We need to host the conda build, to make sure it stays up-to-date. Currently conda installs v0.89. The tutorial code is often broken for this version, esp. for word vectors.

Example build file here: https://github.com/conda/conda-recipes/tree/master/spacy

See also the conda docs.

honnibal avatar Oct 01 '15 19:10 honnibal

@henningpeters , or anyone who wants to help out? :)

honnibal avatar Oct 03 '15 02:10 honnibal

Have a look at this:

https://anaconda.org/spacy/spacy/files

Builds are created by travis for 64bit Linux and OSX:

https://travis-ci.org/henningpeters/spaCy

Build scripts are in my fork at:

https://github.com/henningpeters/spaCy https://github.com/henningpeters/spaCy/commit/6f3ea516849ba260492faf1782f4c4f4998b334e

If we want to integrate this with spaCy we have to think how / if we mix it with the current pip workflow, any suggestions/preferences?

I didn't have any experience with conda and was sceptical why we need another package manager, but from a technical design I really like it over anything that's been out there in Python packaging until now.

henningpeters avatar Oct 05 '15 23:10 henningpeters

Great, thanks.

Haven't checked the build yet, but try removing Cython as a run-time dependency. Usually we only want to build with Cython, and let people install from the .c and .cpp files.

It'd be nice to hook up our tests, too.

Also, fix the license info :).

honnibal avatar Oct 05 '15 23:10 honnibal

Ok, btw: I didn't check the package thoroughly enough, getting following error on import: ImportError: No module named 'spacy.tokenizer' When I get the source from pypi everything is fine Any ideas?

henningpeters avatar Oct 06 '15 00:10 henningpeters

I downloaded and unpacked it, and yeah the .cpp, .c or .so files aren't there --- so, it's not been built correctly.

I would expect there to be some sort of mechanism for including data files and extension modules in the package. So, I think that part of the config still needs to be written.

honnibal avatar Oct 06 '15 00:10 honnibal

How do you install a local build (via setup.py build_ext --inplace) system-wide? The problem is that conda expects the build to be installed in the system and then fetches the files that got installed.

Btw: conda builds are binary/platform-dependent, hence we would distribute .so files, not .c/.cpp

henningpeters avatar Oct 06 '15 09:10 henningpeters

Building conda packages from spacy source is trickier than expected. Not clear how to integrate well with setuptools/pip dependencies. Hence, for now conda builds are based on pypi (which is the standard approach anyways). Here you go:

https://github.com/henningpeters/spaCy-conda https://travis-ci.org/henningpeters/spaCy-conda https://anaconda.org/spacy/spacy

This also means that we are packaging spacy 0.93 including unidecode and the old license terms. Once we are based on text-unidecode (as long as it isn't officially packaged) we will use:

https://github.com/henningpeters/text-unidecode-conda https://anaconda.org/spacy/text-unidecode

Ah, and for trying it out:

conda install -c https://conda.anaconda.org/spacy spacy

henningpeters avatar Oct 07 '15 10:10 henningpeters

I'll give a clean install using this conda on my reformatted rMBP.

rMBP: Retina, 13-inch, Late 2013 Yosemite: 10.10.5 (14F27 Processor: 2.4 GHz Intel Core i5 Memoru: 4 GB 1600 MHz DDR3 Graphics: Intel Iris 1536 MB

veb avatar Oct 07 '15 11:10 veb

Is this resolved now? Specifically, when we push new spaCy to PyPi, do we also ensure that a new version is pushed to conda?

honnibal avatar Oct 14 '15 15:10 honnibal

it's not ensured, but building and uploading conda packages is automated

that's ok as one might need to manually adjust dependencies, etc.

hence i would say make it as closed

henningpeters avatar Oct 14 '15 15:10 henningpeters

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar May 09 '18 16:05 lock[bot]