I created a Azure function in VS code with Python, and tried to deploy to the Azure environment, but failed.
I created a function with Python from local, and didn't create the virtual environment, and it ran successfully from locally test, and I tried to deploy the function by clicking the deploy button (a cloud icon) from the WORKPLACE Local.
And the error output log:
2:09:44 PM liborwebapi: Starting deployment...
2:09:45 PM liborwebapi: Creating zip package...
2:09:45 PM liborwebapi: Zip package size: 4.84 kB
2:09:46 PM liborwebapi: Fetching changes.
2:09:47 PM liborwebapi: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/4d3064b9-1f05-4916-8f9c-c8bb81ad2edd.zip (0.00 MB) to /tmp/zipdeploy/extracted
2:09:49 PM liborwebapi: Updating submodules.
2:09:50 PM liborwebapi: Preparing deployment for commit id '365bc48a-c'.
2:09:50 PM liborwebapi: PreDeployment: context.CleanOutputPath False
2:09:50 PM liborwebapi: PreDeployment: context.OutputPath /home/site/wwwroot
2:09:50 PM liborwebapi: Repository path is /tmp/zipdeploy/extracted
2:09:50 PM liborwebapi: Running oryx build...
2:09:50 PM liborwebapi: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.9.7 -p packagedir=.python_packages/lib/site-packages
2:09:51 PM liborwebapi: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
2:09:51 PM liborwebapi: You can report issues at https://github.com/Microsoft/Oryx/issues
2:09:51 PM liborwebapi: Oryx Version: 0.2.20210120.1, Commit: 66c7820d7df527aaffabd2563a49ad57930999c9, ReleaseTagName: 20210120.1
2:09:51 PM liborwebapi: Build Operation ID: |HFvmXBsiIB0=.ddd78714_
2:09:51 PM liborwebapi: Repository Commit : 365bc48a-cb02-4d40-99b1-9c9b13aad2c1
2:09:51 PM liborwebapi: Detecting platforms...
2:09:51 PM liborwebapi: Detected following platforms:
2:09:51 PM liborwebapi: python: 3.9.7
2:09:51 PM liborwebapi: Source directory : /tmp/zipdeploy/extracted
2:09:51 PM liborwebapi: Destination directory: /home/site/wwwroot
2:09:52 PM liborwebapi: Python Version: /tmp/oryx/platforms/python/3.9.7/bin/python3.9
2:09:52 PM liborwebapi: Running pip install...
2:09:52 PM liborwebapi: [18:09:52+0000] Collecting azure-functions
2:09:52 PM liborwebapi: [18:09:52+0000] Using cached azure_functions-1.11.2-py3-none-any.whl (206 kB)
2:09:52 PM liborwebapi: [18:09:52+0000] Collecting azf-wsgi
2:09:52 PM liborwebapi: [18:09:52+0000] Using cached azf_wsgi-0.3.1-py3-none-any.whl (5.3 kB)
2:09:52 PM liborwebapi: [18:09:52+0000] Collecting pyodbc
2:09:52 PM liborwebapi: [18:09:52+0000] Using cached pyodbc-4.0.34.tar.gz (271 kB)
2:09:53 PM liborwebapi: [18:09:53+0000] Collecting flask
2:09:53 PM liborwebapi: [18:09:53+0000] Using cached Flask-2.2.2-py3-none-any.whl (101 kB)
2:09:53 PM liborwebapi: [18:09:53+0000] Collecting flask_cors
2:09:53 PM liborwebapi: [18:09:53+0000] Using cached Flask_Cors-3.0.10-py2.py3-none-any.whl (14 kB)
2:09:53 PM liborwebapi: [18:09:53+0000] Collecting datetime
2:09:53 PM liborwebapi: [18:09:53+0000] Downloading DateTime-4.7-py2.py3-none-any.whl (52 kB)
2:09:53 PM liborwebapi: [18:09:53+0000] Collecting waitress
2:09:54 PM liborwebapi: [18:09:53+0000] Downloading waitress-2.1.2-py3-none-any.whl (57 kB)
2:09:54 PM liborwebapi: [18:09:53+0000] Collecting click>=8.0
2:09:54 PM liborwebapi: [18:09:53+0000] Downloading click-8.1.3-py3-none-any.whl (96 kB)
2:09:54 PM liborwebapi: [18:09:53+0000] Collecting itsdangerous>=2.0
2:09:54 PM liborwebapi: [18:09:53+0000] Downloading itsdangerous-2.1.2-py3-none-any.whl (15 kB)
2:09:54 PM liborwebapi: [18:09:53+0000] Collecting Werkzeug>=2.2.2
2:09:54 PM liborwebapi: [18:09:53+0000] Downloading Werkzeug-2.2.2-py3-none-any.whl (232 kB)
2:09:54 PM liborwebapi: [18:09:54+0000] Collecting importlib-metadata>=3.6.0; python_version < "3.10"
2:09:54 PM liborwebapi: [18:09:54+0000] Downloading importlib_metadata-4.12.0-py3-none-any.whl (21 kB)
2:09:54 PM liborwebapi: [18:09:54+0000] Collecting Jinja2>=3.0
2:09:54 PM liborwebapi: [18:09:54+0000] Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
2:09:54 PM liborwebapi: [18:09:54+0000] Collecting Six
2:09:54 PM liborwebapi: [18:09:54+0000] Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
2:09:54 PM liborwebapi: [18:09:54+0000] Collecting pytz
2:09:54 PM liborwebapi: [18:09:54+0000] Downloading pytz-2022.2.1-py2.py3-none-any.whl (500 kB)
2:09:55 PM liborwebapi: [18:09:55+0000] Collecting zope.interface
2:09:55 PM liborwebapi: [18:09:55+0000] Downloading zope.interface-5.4.0-cp39-cp39-manylinux2010_x86_64.whl (255 kB)
2:09:55 PM liborwebapi: [18:09:55+0000] Collecting MarkupSafe>=2.1.1
2:09:55 PM liborwebapi: [18:09:55+0000] Downloading MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
2:09:55 PM liborwebapi: [18:09:55+0000] Collecting zipp>=0.5
2:09:55 PM liborwebapi: [18:09:55+0000] Downloading zipp-3.8.1-py3-none-any.whl (5.6 kB)
2:09:56 PM liborwebapi: [18:09:56+0000] Collecting setuptools
2:09:56 PM liborwebapi: [18:09:56+0000] Downloading setuptools-65.4.0-py3-none-any.whl (1.2 MB)
2:09:56 PM liborwebapi: [18:09:56+0000] Building wheels for collected packages: pyodbc
2:09:56 PM liborwebapi: [18:09:56+0000] Building wheel for pyodbc (setup.py): started
2:10:02 PM liborwebapi: [18:10:02+0000] Building wheel for pyodbc (setup.py): finished with status 'done'
2:10:02 PM liborwebapi: [18:10:02+0000] Created wheel for pyodbc: filename=pyodbc-4.0.34-cp39-cp39-linux_x86_64.whl size=281778 sha256=bf4e3f13b3051b89bc5bb838cea799b00bd8f6535be474640942a874109e000a
2:10:02 PM liborwebapi: [18:10:02+0000] Stored in directory: /usr/local/share/pip-cache/wheels/66/a1/a9/f74a4f22c1108fb47bfb125d510f5fcfe4ee0aca4eb76ec45e
2:10:02 PM liborwebapi: [18:10:02+0000] Successfully built pyodbc
2:10:02 PM liborwebapi: [18:10:02+0000] Installing collected packages: azure-functions, azf-wsgi, pyodbc, click, itsdangerous, MarkupSafe, Werkzeug, zipp, importlib-metadata, Jinja2, flask, Six, flask-cors, pytz, setuptools, zope.interface, datetime, waitress
2:10:05 PM liborwebapi: [18:10:05+0000] Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.1 Six-1.16.0 Werkzeug-2.2.2 azf-wsgi-0.3.1 azure-functions-1.11.2 click-8.1.3 datetime-4.7 flask-2.2.2 flask-cors-3.0.10 importlib-metadata-4.12.0 itsdangerous-2.1.2 pyodbc-4.0.34 pytz-2022.2.1 setuptools-65.4.0 waitress-2.1.2 zipp-3.8.1 zope.interface-5.4.0
2:10:05 PM liborwebapi: WARNING: You are using pip version 20.2.3; however, version 22.2.2 is available.
2:10:05 PM liborwebapi: You should consider upgrading via the '/tmp/oryx/platforms/python/3.9.7/bin/python3.9 -m pip install --upgrade pip' command.
2:10:05 PM liborwebapi: Done in 14 sec(s).
2:10:05 PM liborwebapi: Preparing output...
2:10:05 PM liborwebapi: Copying files to destination directory '/home/site/wwwroot'...
2:10:05 PM liborwebapi: Done in 0 sec(s).
2:10:05 PM liborwebapi: Removing existing manifest file
2:10:05 PM liborwebapi: Creating a manifest file...
2:10:05 PM liborwebapi: Manifest file created.
2:10:05 PM liborwebapi: Done in 14 sec(s).
2:10:07 PM liborwebapi: Running post deployment command(s)...
2:10:07 PM liborwebapi: Generating summary of Oryx build
2:10:07 PM liborwebapi: Deployment Log file does not exist in /tmp/oryx-build.log
2:10:07 PM liborwebapi: The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
2:10:07 PM liborwebapi: Triggering recycle (preview mode disabled).
2:10:07 PM liborwebapi: Linux Consumption plan has a 1.5 GB memory limit on a remote build container.
2:10:07 PM liborwebapi: To check our service limit, please visit https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#service-limits
2:10:07 PM liborwebapi: Creating placeholder blob for linux consumption function app...
2:10:07 PM liborwebapi: Malformed SCM_RUN_FROM_PACKAGE when uploading built content.
2:10:07 PM liborwebapi: Generating summary of Oryx build
2:10:07 PM liborwebapi: Deployment Log file does not exist in /tmp/oryx-build.log
2:10:07 PM liborwebapi: The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
2:10:07 PM liborwebapi: Deployment Failed. deployer = Push-Deployer deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.
2:10:12 PM liborwebapi: Deployment failed.
``
What can I do?