Error in deployment

hai i’m using python the framwork is flask is this framwork is support in this site.i had is error when i’m trying to deploy. this my error(12:38:00 PM: Build ready to start
12:38:02 PM: build-image version: e4d2dbe4cfec46db257e869258461ded89b75c9b
12:38:02 PM: build-image tag: v3.7.3
12:38:02 PM: buildbot version: 3570adff9e775d96a22963f85b54bfee165e30b9
12:38:02 PM: Fetching cached dependencies
12:38:03 PM: Failed to fetch cache, continuing with build
12:38:03 PM: Starting to prepare the repo for build
12:38:03 PM: No cached dependencies found. Cloning fresh repo
12:38:03 PM: git clone GitHub - chandruramachandiran/cv
12:38:04 PM: Preparing Git Reference refs/heads/master
12:38:05 PM: Parsing package.json dependencies
12:38:06 PM: Starting build script
12:38:06 PM: Installing dependencies
12:38:06 PM: Python version set to 2.7
12:38:08 PM: v12.18.0 is already installed.
12:38:08 PM: Now using node v12.18.0 (npm v6.14.4)
12:38:08 PM: Started restoring cached build plugins
12:38:08 PM: Finished restoring cached build plugins
12:38:08 PM: Attempting ruby version 2.7.1, read from environment
12:38:10 PM: Using ruby version 2.7.1
12:38:10 PM: Using PHP version 5.6
12:38:10 PM: Started restoring cached go cache
12:38:10 PM: Finished restoring cached go cache
12:38:10 PM: go version go1.14.4 linux/amd64
12:38:10 PM: go version go1.14.4 linux/amd64
12:38:10 PM: Installing missing commands
12:38:10 PM: Verify run directory
12:38:12 PM: ​
12:38:12 PM: ────────────────────────────────────────────────────────────────
12:38:12 PM: Netlify Build
12:38:12 PM: ────────────────────────────────────────────────────────────────
12:38:12 PM: ​
12:38:12 PM: ❯ Version
12:38:12 PM: @netlify/build 11.9.1
12:38:12 PM: ​
12:38:12 PM: ❯ Flags
12:38:12 PM: deployId: 609395d0c189936c2544d5c4
12:38:12 PM: ​
12:38:12 PM: ❯ Current directory
12:38:12 PM: /opt/build/repo
12:38:12 PM: ​
12:38:12 PM: ❯ Config file
12:38:12 PM: No config file was defined: using default values.
12:38:12 PM: ​
12:38:12 PM: ❯ Context
12:38:12 PM: production
12:38:12 PM: ​
12:38:12 PM: ────────────────────────────────────────────────────────────────
12:38:12 PM: 1. Build command from Netlify app
12:38:12 PM: ────────────────────────────────────────────────────────────────
12:38:12 PM: ​
12:38:12 PM: $ python3 main.py
12:38:12 PM: Traceback (most recent call last):
12:38:12 PM: File β€œmain.py”, line 1, in
12:38:12 PM: from flask import Flask,render_template,send_file
12:38:12 PM: ImportError: No module named β€˜flask’
12:38:12 PM: ​
12:38:12 PM: ────────────────────────────────────────────────────────────────
12:38:12 PM: β€œbuild.command” failed
12:38:12 PM: ────────────────────────────────────────────────────────────────
12:38:12 PM: ​
12:38:12 PM: Error message
12:38:12 PM: Command failed with exit code 1: python3 main.py
12:38:12 PM: ​
12:38:12 PM: Error location
12:38:12 PM: In Build command from Netlify app:
12:38:12 PM: python3 main.py
12:38:12 PM: ​
12:38:12 PM: Resolved config
12:38:12 PM: build:
12:38:12 PM: command: python3 main.py
12:38:12 PM: commandOrigin: ui
12:38:12 PM: publish: /opt/build/repo/site
12:38:13 PM: Caching artifacts
12:38:13 PM: Started saving build plugins
12:38:13 PM: Finished saving build plugins
12:38:13 PM: Started saving pip cache
12:38:13 PM: Finished saving pip cache
12:38:13 PM: Started saving emacs cask dependencies
12:38:13 PM: Finished saving emacs cask dependencies
12:38:13 PM: Started saving maven dependencies
12:38:13 PM: Finished saving maven dependencies
12:38:13 PM: Started saving boot dependencies
12:38:13 PM: Finished saving boot dependencies
12:38:13 PM: Started saving rust rustup cache
12:38:13 PM: Finished saving rust rustup cache
12:38:13 PM: Started saving go dependencies
12:38:13 PM: Finished saving go dependencies
12:38:15 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:38:15 PM: Creating deploy upload records
12:38:15 PM: Failing build: Failed to build site
12:38:15 PM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 2
12:38:15 PM: Finished processing build request in 13.182314075s)

Hey there, @auro_creation :wave:

Welcome to the Netlify Forums! Thanks for reaching out. This Support Guide as well as the troubleshooting section of Netlify Docs are two good places to start.

If you work through both of those and are still having issues, please come back and share what you tried as well as your Netlify site name.

if i follow this instruction is this my site will deploy?

i’m using java script for design, is this necessary to create package.json

do u have any tutorial video how to do this instruction it will help me

hi @auro_creation ,

are you trying to deploy a site that uses python to run at build time? That will not work the way you are hoping to, i don’t think.

Here is a good summary of what you can and can not do on Netlify you might find helpful:

also this is a fantastic tutorial from our former colleague swyx:

1 Like