Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

465
Vistas
SpaCy: How to get the spacy model name?

It doesn't show up in pip list

zeke$ pip list | grep spacy
spacy (1.7.3)

How do I get the name of the model?


I tried this but it doesn't work

echo "spaCy model:"
python3 -m sputnik --name spacy find

Throws up this error:

zeke$ python3 -m sputnik --name spacy find
Traceback (most recent call last):
  File "/Users/zeke/anaconda/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/zeke/anaconda/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/zeke/anaconda/lib/python3.5/site-packages/sputnik/__main__.py", line 28, in <module>
    main()
  File "/Users/zeke/anaconda/lib/python3.5/site-packages/sputnik/__main__.py", line 12, in main
    args.run(args)
  File "/Users/zeke/anaconda/lib/python3.5/site-packages/sputnik/cli.py", line 89, in run
    data_path=args.data_path)
  File "/Users/zeke/anaconda/lib/python3.5/site-packages/sputnik/__init__.py", line 114, in find
    obj = cls(app_name, app_version, expand_path(data_path))
  File "/Users/zeke/anaconda/lib/python3.5/site-packages/sputnik/pool.py", line 19, in __init__
    super(Pool, self).__init__(app_name, app_version, path, **kwargs)
  File "/Users/zeke/anaconda/lib/python3.5/site-packages/sputnik/package_list.py", line 33, in __init__
    self.load()
  File "/Users/zeke/anaconda/lib/python3.5/site-packages/sputnik/package_list.py", line 51, in load
    for package in self.packages():
  File "/Users/zeke/anaconda/lib/python3.5/site-packages/sputnik/package_list.py", line 47, in packages
    yield self.__class__.package_class(path=os.path.join(self.path, path))
  File "/Users/zeke/anaconda/lib/python3.5/site-packages/sputnik/package.py", line 15, in __init__
    super(Package, self).__init__(defaults=meta['package'])
KeyError: 'package'
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The sputnik package manager is deprecated as of spaCy version 1.7.0. In your version, you should be able to see all installed / linked models using spacy info:

python -m spacy info     # info about spaCy and installed models
python -m spacy info en  # info about model with the shortcut link 'en'

All model meta is also exposed as the meta attribute of the Language class, so from within your script, you can do:

nlp = spacy.load('en') # or any other model
print(nlp.meta['name'])

If you have downloaded models via spaCy's new download command, they'll be installed as pip packages. This means that they should show up when you run pip list or pip freeze from within the same environment.

Note that models are not downloaded automatically when you install spaCy, so you have to download them separately (see the docs for a list of available models):

python -m spacy download en              # default English model (~50MB)
python -m spacy download en_core_web_md  # larger English model (~1GB)
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda