Skip to content

Error when loading reddit_vectors-1.1.0 #49

@GregSilverman

Description

@GregSilverman

Adding to existing Jupyter notebook that is run from a docker container, I do the following:

import sense2vec
s2v = sense2vec.load('reddit_vectors-1.1.0')

which throws the error:

/usr/local/lib/python3.5/dist-packages/sense2vec/util.py in get_package_by_name(name, via)
     18                                name or about.default_model, data_path=via)
     19     except PackageNotFoundException as e:
---> 20         raise RuntimeError("Model not installed. Please run 'python -m "
     21                            "sense2vec.download' to install latest compatible "
     22                            "model.")

Model not installed. Please run 'python -m sense2vec.download' to install latest compatible model.

I then create a local image of the container using a TensorFlow Dockerfile, and in the Dockerfile I issue RUN pip install sense2vec when building my Docker container, but if I do a RUN ipython -m sense2vec.download I get an error that print("Model already installed. Please run '%s --force to reinstall." % sys.argv[0], file=sys.stderr)
AttributeError: module 'sense2vec.about' has no attribute '__title__'.

The same happens if I SSH into the Docker container, that is, if I do an ipython -m sense2vec.download from the command line I get the error that print("Model already installed. Please run '%s --force to reinstall." % sys.argv[0], file=sys.stderr)

The iPython version is 3.5. Docker container's OS version is 64-bit: SMP Wed Mar 14 15:12:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I just noticed the requirement of CPython. Since Jupyter uses iPython, I suppose there is no way to get this to work? even if so, why the discrepancy is error from outside the container and inside it?

Please advise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    usageGeneral usage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions