Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next.js + Flask example Deploy failed #946

Open
7laria opened this issue Aug 19, 2024 · 4 comments
Open

Next.js + Flask example Deploy failed #946

7laria opened this issue Aug 19, 2024 · 4 comments

Comments

@7laria
Copy link

7laria commented Aug 19, 2024

I've tried to deploy this example https://vercel.com/templates/next.js/nextjs-flask-starter
but during the deployment the following error is shown:
Error: Command failed: pip3.12 install --disable-pip-version-check --target . --upgrade -r /vercel/path0/requirements.txt
Screenshot 2024-08-19 alle 16 08 55
And the deploy fails

sup added a commit to sup/examples that referenced this issue Aug 26, 2024
pip fails to install this dependency on Python 3.12 vercel#946

While fixing the error is certainly one way of going about it, numpy is not even used for the hello-world Flask app this ships with. To simplify things, this commit removes numpy as a dependency entirely.
@SimonIyamu
Copy link

SimonIyamu commented Sep 6, 2024

I had the same error and solved it by

  • pip install setuptools
  • changing the numpy version to 1.26.4 in requirements.txt.

@peterdresslar
Copy link

I don't think numpy is used at all at this point, so better to clean it out. The path of:

  • pnpm create next-app -e python/nextjs-flask
  • [edit out numpy entry in requirements.txt]
  • commit to main
  • push to github
  • connect vercel to repo
  • deploy via Vercel UI

Does seem to work fine.

@gaborcselle
Copy link

Thanks for that pointer @peterdresslar, removing the numpy dependency solved it for me too.

@peterdresslar
Copy link

Sure! But @sup deserves the credit for their #947 that correctly fixed the issue a few weeks ago

leerob pushed a commit that referenced this issue Sep 15, 2024
### Description
pip fails to install this dependency on Python 3.12

* Stacktrace:
https://gist.github.com/sup/f0ff6eb90c03fbe7bd4329b0202dbbb8
* Issue: #946

While fixing the root cause of the error is certainly one way of going
about it, numpy is not even used for the hello-world Flask app this
ships with. To simplify things, this commit removes numpy as a
dependency entirely.

### Demo URL

https://automaton-seven.vercel.app/

### Type of Change

- [ ] New Example
- [x] Example updates (Bug fixes, new features, etc.)
- [ ] Other (changes to the codebase, but not to examples)

### New Example Checklist
Not applicable

- [ ] 🛫 `npm run new-example` was used to create the example
- [ ] 📚 The template wasn't used but I carefuly read the [Adding a new
example](https://github.com/vercel/examples#adding-a-new-example) steps
and implemented them in the example
- [ ] 📱 Is it responsive? Are mobile and tablets considered?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants