question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot deploy on Heroku using Flask

See original GitHub issue

In the code I am using:

spacy.load('en_core_web_sm')

It runs this error: OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

Also tried installing:

spacy==2.0.18
https://github.com/explosion/spacy-models/releases/download/en_core_web_md-2.0.0/en_core_web_md-2.0.0.tar.gz#egg=en_core_web_md==2.0.0
import spacy
import en_core_web_md
nlp = en_core_web_md.load()

Problem still occurs

Tried to put the model in the static folder but it does not recognize it. Are there any workarounds? Thank you

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
adrianeboydcommented, Aug 6, 2020

It’s probably best to figure out why the model package install isn’t working with pip, since those requirements look fine. (The download is failing, it’s not being installed in the right environment, etc. ?)

Possible workarounds: you can download the .tar.gz file from that link and install it directly with pip from a local path, or if you download and unpack the file, the model itself is a subdirectory and you can load it from the full path with spacy.load() instead of using the package name.

0reactions
github-actions[bot]commented, Nov 2, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I cant deploy my flask app on heroku - python - Stack Overflow
I cant deploy my flask app on heroku · complete_log probably has a unicode character. Try .encode() method at the end check if...
Read more >
How to Deploy a Python + Flask API on Heroku | by Debbie
We are going to create a simple script in Python + Flask from scratch, push it to a GitHub repository, and then deploy...
Read more >
Deploy Python Flask App on Heroku - GeeksforGeeks
Let's create a simple flask application first and then it can be deployed to heroku. Create a folder named “eflask” and open the...
Read more >
Deploying a Flask Application to Heroku - Stack Abuse
In this tutorial you will learn how to deploy a Flask application to Heroku. The app can be as simple as a "Hello...
Read more >
How to Deploy a Flask app on Heroku. - DEV Community ‍ ‍
Step-1: Install Heroku CLI. % brew tap heroku/brew && brew install heroku ; Step-2: Create Python Virtual Environment. % python3 -m venv ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found