Coder Social home page Coder Social logo

azure-samples / azure-python-labs Goto Github PK

View Code? Open in Web Editor NEW
165.0 26.0 105.0 53.81 MB

Labs demonstrating how to use Python with Azure, Visual Studio Code, GitHub, Windows Subsystem for Linux, and more!

Home Page: https://aka.ms/python-virtual-labs

License: MIT License

PowerShell 0.66% Dockerfile 0.35% Python 81.70% Jupyter Notebook 16.20% Shell 0.16% CSS 0.18% HTML 0.76%

azure-python-labs's Introduction

page_type languages products description urlFragment
sample
python
azure
A collection of labs demonstrating how to build Python applications with Azure and Visual Studio Code.
azure-python-labs

Azure Python Labs

A collection of labs demonstrating how to build Python applications with Azure and Visual Studio Code.

Join the Microsoft Python Discord (http://aka.ms/python-discord ) and the #python-virtual-labs channel to ask questions, get help with labs, and/or further instructions (also see: https://aka.ms/python-virtual-labs for our PyCon 2022 experience).

Python & Visual Studio Code in the browser with vscode.dev

vscode.dev is a lightweight version of Visual Studio Code that runs fully in the browser, providing the ability to navigate files and repositories, and it's ideal for committing lightweight code changes.

In this lab, we will go through the process of creating and running Python code in Jupyter Notebooks on the browser. We'll create a simplified version of the popular wordle game.

Python & Visual Studio Code in the browser with vscode.dev

Cloud Native Python with Azure Container Apps, Azure Container Registry, and FastAPI on PyPy

In this lab you will containerize an existing Python application using the Azure CLI, a private Azure Container Registry, and Azure Container Registry Tasks. You will then deploy it to Azure Container Apps, which enables you to run microservices and containerized applications on a serverless platform.

Cloud Native Python with Azure Container Apps, Container Registry, and FastAPI on PyPy

Serverless Containers with Python, Azure Container Apps, and GitHub Container Registry

In this lab you will create a sample Python app from a template repository in GitHub. You will then use the included GitHub Actions workflow which will build a container image you can then make public. You will then deploy the public container image to Azure Container Apps, which enables you to run microservices and containerized applications on a serverless platform.

Serverless Containers with Python, Azure Container Apps, and GitHub Container Registry

Sentiment Analysis with Python Azure Functions

In this lab, you will build a serverless HTTP API with Azure Functions that takes a sentence as an input and returns the sentiment of the sentence.

  • Build a serverless HTTP API with Azure Functions
  • Run and debug the API locally on your machine
  • Deploy the API to Azure Functions

Sentiment Analysis with Python Azure Functions lab

Cyber Security Investigations and Analysis with MSTICPy

This lab is an introduction to MSTICPy - an open source cyber security tool kit created by the Microsoft Threat Intelligence Center. In this lab you will learn about the core features of MSTICPy, and how to use to them in cyber security incident response or threat hunting. This lab takes the form of a Jupyter Notebook that you can run locally or directly in your browser.

Cyber Security Investigations and Analysis with MSTICPy lab

Explore Azure Database for PostgreSQL with Python

In this lab, you will learn how to import data into an Azure Database for PostgreSQL instance using a python script and the psycopg2 module. You will learn to:

  • Connect to an Azure Database for PostgreSQL
  • Use the psycopg2 to load and query data in the database.

Azure Databse for PostgreSQL with Python lab

Explore the Distributed Application Runtime (Dapr) with Python

  • Get hands-on with Dapr by running it on your local machine through the Try Dapr experience.
  • Explore State Mangement and Secrets building blocks via the REST API using cURL (optional), Python Requests, and the Dapr SDK for Python (dapr/python-sdk).
  • Seamlessly swap the State component from local development to a managed service in the cloud.

Explore the Distributed Application Runtime (Dapr) with Python lab

Real-Time Analytics on Azure Database for PostgreSQL - Hyperscale (Citus)

This workshop is meant to be an introduction to Azure Database for PostgreSQL Hyperscale (Citus). First, you will create a cluster to scale out PostgreSQL and turn it into a distributed database. Then, you will create a schema and tables, load test data, and create a rollup function to massively speed up your query workload.

Real-Time Analytics on Azure Database for PostgreSQL lab


azure-python-labs's People

Contributors

aka-vm avatar anthonychu avatar aprilspeight avatar asw101 avatar btardif avatar colton-citus avatar cxznmhdcxz avatar dependabot[bot] avatar ethomson avatar heatherbshapiro avatar ibidani avatar jackenmen avatar kaerm avatar luabud avatar microsoftopensource avatar msftgits avatar nzsmith1 avatar octref avatar oleksis avatar pamelafox avatar petebryan avatar pluckyprecious avatar qubitron avatar salehalbuga avatar siddhanthunnithan avatar sptramer avatar suvishodcitus avatar t-eckert avatar v-rajagt-zz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-python-labs's Issues

requests 2.21.0 incompatible with urllib3 1.25.2 (wants an older urllib3)

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

curl -L https://aka.ms/InstallAzureCli | bash

Any log messages given by the failure

ERROR: requests 2.21.0 has requirement urllib3<1.25,>=1.21.1, but you'll have urllib3 1.25.2 which is incompatible.

Expected/desired behavior

requests would be in sync with a newer urllib3

OS and Version?

Linux (Arch)

Versions

N/A. Up-to-date.

2a Flask lab

it needs app.py and requirements.txt cloned to the machines. Needs to be clear about where each file should be. The config.json should be:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Flask",
            "type": "python",
            "request": "launch",
            "module": "flask",
            "env": {
                "FLASK_APP": "app.py",
                "FLASK_ENV": "development",
                "FLASK_DEBUG": "0"
            },
            "args": [
                "run",
                 "--host","0.0.0.0",
                "--no-debugger",
                "--no-reload"
            ],
            "jinja": true
        }
    ]
}

Dapr lab only install without errors on Python 3.9 but no such information is given

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run these commands on Ubuntu 20.04:

git clone https://github.com/Azure-Samples/azure-python-labs.git
cd azure-python-labs/01-dapr
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt

Any log messages given by the failure

This is output on Python 3.8 (not entirely sure that this actually failed but there are error messages here that I did not see on Python 3.9):

Python 3.8 output
❯ pip install -r requirements.txt
Collecting aiohttp==3.7.4.post0
  Using cached aiohttp-3.7.4.post0-cp38-cp38-manylinux2014_x86_64.whl (1.5 MB)
Collecting async-timeout==3.0.1
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting attrs==20.3.0
  Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting certifi==2020.12.5
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting dapr==1.1.0
  Downloading dapr-1.1.0-py3-none-any.whl (70 kB)
     |████████████████████████████████| 70 kB 1.2 MB/s 
Collecting fire==0.4.0
  Downloading fire-0.4.0.tar.gz (87 kB)
     |████████████████████████████████| 87 kB 3.0 MB/s 
Collecting grpcio==1.37.1
  Downloading grpcio-1.37.1-cp38-cp38-manylinux2014_x86_64.whl (4.2 MB)
     |████████████████████████████████| 4.2 MB 2.7 MB/s 
Collecting idna==2.10
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting multidict==5.1.0
  Using cached multidict-5.1.0-cp38-cp38-manylinux2014_x86_64.whl (159 kB)
Collecting protobuf==3.13.0
  Downloading protobuf-3.13.0-cp38-cp38-manylinux1_x86_64.whl (1.3 MB)
     |████████████████████████████████| 1.3 MB 4.7 MB/s 
Collecting python-dateutil==2.8.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting requests==2.25.1
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting six==1.15.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting termcolor==1.1.0
  Downloading termcolor-1.1.0.tar.gz (3.9 kB)
Collecting typing-extensions==3.7.4.3
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting urllib3==1.26.3
  Using cached urllib3-1.26.3-py2.py3-none-any.whl (137 kB)
Collecting yarl==1.6.3
  Using cached yarl-1.6.3-cp38-cp38-manylinux2014_x86_64.whl (324 kB)
Requirement already satisfied: setuptools in ./env/lib/python3.8/site-packages (from protobuf==3.13.0->-r requirements.txt (line 11)) (44.0.0)
Building wheels for collected packages: fire, termcolor
  Building wheel for fire (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/jack/work/azure-python-labs/01-dapr/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fpjko75m/fire/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fpjko75m/fire/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-qj7_nfe6
       cwd: /tmp/pip-install-fpjko75m/fire/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for fire
  Running setup.py clean for fire
  Building wheel for termcolor (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/jack/work/azure-python-labs/01-dapr/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fpjko75m/termcolor/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fpjko75m/termcolor/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-wommazse
       cwd: /tmp/pip-install-fpjko75m/termcolor/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for termcolor
  Running setup.py clean for termcolor
Failed to build fire termcolor
Installing collected packages: async-timeout, chardet, attrs, multidict, typing-extensions, idna, yarl, aiohttp, certifi, six, grpcio, protobuf, python-dateutil, dapr, termcolor, fire, urllib3, requests
    Running setup.py install for termcolor ... done
    Running setup.py install for fire ... done
Successfully installed aiohttp-3.7.4.post0 async-timeout-3.0.1 attrs-20.3.0 certifi-2020.12.5 chardet-3.0.4 dapr-1.1.0 fire-0.4.0 grpcio-1.37.1 idna-2.10 multidict-5.1.0 protobuf-3.13.0 python-dateutil-2.8.1 requests-2.25.1 six-1.15.0 termcolor-1.1.0 typing-extensions-3.7.4.3 urllib3-1.26.3 yarl-1.6.3

Python 3.10 output:

Python 3.10 output
❯ pip install -r requirements.txt
Collecting aiohttp==3.7.4.post0
  Downloading aiohttp-3.7.4.post0.tar.gz (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 4.2 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting async-timeout==3.0.1
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting attrs==20.3.0
  Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting certifi==2020.12.5
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting dapr==1.1.0
  Using cached dapr-1.1.0-py3-none-any.whl (70 kB)
Collecting fire==0.4.0
  Using cached fire-0.4.0.tar.gz (87 kB)
  Preparing metadata (setup.py) ... done
Collecting grpcio==1.37.1
  Downloading grpcio-1.37.1.tar.gz (21.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.7/21.7 MB 4.9 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting idna==2.10
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting multidict==5.1.0
  Downloading multidict-5.1.0.tar.gz (53 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.7/53.7 KB 6.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting protobuf==3.13.0
  Downloading protobuf-3.13.0-py2.py3-none-any.whl (438 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 438.4/438.4 KB 41.8 MB/s eta 0:00:00
Collecting python-dateutil==2.8.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting requests==2.25.1
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting six==1.15.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting termcolor==1.1.0
  Using cached termcolor-1.1.0.tar.gz (3.9 kB)
  Preparing metadata (setup.py) ... done
Collecting typing-extensions==3.7.4.3
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting urllib3==1.26.3
  Using cached urllib3-1.26.3-py2.py3-none-any.whl (137 kB)
Collecting yarl==1.6.3
  Downloading yarl-1.6.3.tar.gz (176 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 176.8/176.8 KB 16.3 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: setuptools in ./env/lib/python3.10/site-packages (from protobuf==3.13.0->-r requirements.txt (line 11)) (58.1.0)
Using legacy 'setup.py install' for fire, since package 'wheel' is not installed.
Using legacy 'setup.py install' for grpcio, since package 'wheel' is not installed.
Using legacy 'setup.py install' for termcolor, since package 'wheel' is not installed.
Building wheels for collected packages: aiohttp, multidict, yarl
  Building wheel for aiohttp (pyproject.toml) ... done
  Created wheel for aiohttp: filename=aiohttp-3.7.4.post0-py3-none-any.whl size=451945 sha256=c32092ef86907fbfcf8888ad253f34ca05a94479b3fab2437710d099d0245115
  Stored in directory: /home/jack/.cache/pip/wheels/fc/84/e0/52113c57eb9b09b6b187a0f369eaad6fc7fc64bb7247c83b89
  Building wheel for multidict (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for multidict (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [48 lines of output]
      *********************
      * Accelerated build *
      *********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/_compat.py -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/_multidict_py.py -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/_multidict_base.py -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/_abc.py -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/__init__.py -> build/lib.linux-x86_64-cpython-310/multidict
      running egg_info
      writing multidict.egg-info/PKG-INFO
      writing dependency_links to multidict.egg-info/dependency_links.txt
      writing top-level names to multidict.egg-info/top_level.txt
      reading manifest file 'multidict.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files found matching 'multidict/_multidict.html'
      warning: no previously-included files found matching 'multidict/*.so'
      warning: no previously-included files found matching 'multidict/*.pyd'
      warning: no previously-included files found matching 'multidict/*.pyd'
      no previously-included directories found matching 'docs/_build'
      adding license file 'LICENSE'
      writing manifest file 'multidict.egg-info/SOURCES.txt'
      copying multidict/__init__.pyi -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/_multidict.c -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/py.typed -> build/lib.linux-x86_64-cpython-310/multidict
      creating build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/defs.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/dict.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/istr.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/iter.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/pair_list.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/views.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      running build_ext
      building 'multidict._multidict' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/multidict
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/jack/work/azure-python-labs/01-dapr/env/include -I/usr/include/python3.10 -c multidict/_multidict.c -o build/temp.linux-x86_64-cpython-310/multidict/_multidict.o -O2 -std=c99 -Wall -Wsign-compare -Wconversion -fno-strict-aliasing -pedantic
      multidict/_multidict.c:1:10: fatal error: Python.h: No such file or directory
          1 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for multidict
  Building wheel for yarl (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for yarl (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [43 lines of output]
      **********************
      * Accellerated build *
      **********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_url.py -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_quoting_py.py -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_quoting.py -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/__init__.py -> build/lib.linux-x86_64-cpython-310/yarl
      running egg_info
      writing yarl.egg-info/PKG-INFO
      writing dependency_links to yarl.egg-info/dependency_links.txt
      writing requirements to yarl.egg-info/requires.txt
      writing top-level names to yarl.egg-info/top_level.txt
      reading manifest file 'yarl.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.cache' found anywhere in distribution
      warning: no previously-included files found matching 'yarl/*.html'
      warning: no previously-included files found matching 'yarl/*.so'
      warning: no previously-included files found matching 'yarl/*.pyd'
      no previously-included directories found matching 'docs/_build'
      adding license file 'LICENSE'
      writing manifest file 'yarl.egg-info/SOURCES.txt'
      copying yarl/__init__.pyi -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_quoting_c.c -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_quoting_c.pyi -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_quoting_c.pyx -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/py.typed -> build/lib.linux-x86_64-cpython-310/yarl
      running build_ext
      building 'yarl._quoting_c' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/yarl
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/jack/work/azure-python-labs/01-dapr/env/include -I/usr/include/python3.10 -c yarl/_quoting_c.c -o build/temp.linux-x86_64-cpython-310/yarl/_quoting_c.o
      yarl/_quoting_c.c:4:10: fatal error: Python.h: No such file or directory
          4 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for yarl
Successfully built aiohttp
Failed to build multidict yarl
ERROR: Could not build wheels for multidict, yarl, which is required to install pyproject.toml-based projects

Python 3.9 (working) output:

Python 3.9 output
❯ pip install -r requirements.txt
Collecting aiohttp==3.7.4.post0
  Downloading aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 2.9 MB/s eta 0:00:00
Collecting async-timeout==3.0.1
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting attrs==20.3.0
  Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting certifi==2020.12.5
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting dapr==1.1.0
  Using cached dapr-1.1.0-py3-none-any.whl (70 kB)
Collecting fire==0.4.0
  Using cached fire-0.4.0.tar.gz (87 kB)
  Preparing metadata (setup.py) ... done
Collecting grpcio==1.37.1
  Downloading grpcio-1.37.1-cp39-cp39-manylinux2014_x86_64.whl (4.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 5.5 MB/s eta 0:00:00
Collecting idna==2.10
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting multidict==5.1.0
  Downloading multidict-5.1.0-cp39-cp39-manylinux2014_x86_64.whl (151 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.2/151.2 KB 5.4 MB/s eta 0:00:00
Collecting protobuf==3.13.0
  Using cached protobuf-3.13.0-py2.py3-none-any.whl (438 kB)
Collecting python-dateutil==2.8.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting requests==2.25.1
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting six==1.15.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting termcolor==1.1.0
  Using cached termcolor-1.1.0.tar.gz (3.9 kB)
  Preparing metadata (setup.py) ... done
Collecting typing-extensions==3.7.4.3
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting urllib3==1.26.3
  Using cached urllib3-1.26.3-py2.py3-none-any.whl (137 kB)
Collecting yarl==1.6.3
  Downloading yarl-1.6.3-cp39-cp39-manylinux2014_x86_64.whl (315 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 315.0/315.0 KB 24.9 MB/s eta 0:00:00
Requirement already satisfied: setuptools in ./env/lib/python3.9/site-packages (from protobuf==3.13.0->-r requirements.txt (line 11)) (58.1.0)
Using legacy 'setup.py install' for fire, since package 'wheel' is not installed.
Using legacy 'setup.py install' for termcolor, since package 'wheel' is not installed.
Installing collected packages: typing-extensions, termcolor, chardet, certifi, urllib3, six, multidict, idna, attrs, async-timeout, yarl, requests, python-dateutil, protobuf, grpcio, fire, aiohttp, dapr
  Running setup.py install for termcolor ... done
  Running setup.py install for fire ... done
Successfully installed aiohttp-3.7.4.post0 async-timeout-3.0.1 attrs-20.3.0 certifi-2020.12.5 chardet-3.0.4 dapr-1.1.0 fire-0.4.0 grpcio-1.37.1 idna-2.10 multidict-5.1.0 protobuf-3.13.0 python-dateutil-2.8.1 requests-2.25.1 six-1.15.0 termcolor-1.1.0 typing-extensions-3.7.4.3 urllib3-1.26.3 yarl-1.6.3

Expected/desired behavior

I expected either no errors or information in the README on what Python versions are supported.

OS and Version?

Ubuntu 20.04

Versions

python3.8, python3.8-venv from standard repositories
python3.9, python3.9-venv, python3.10, python3.10-venv from deadsnakes ppa

Mention any other details that might be useful

Can't think of anything else

Instruction button label incorrect

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

The instructions for step 2 of this lab https://github.com/Azure-Samples/azure-python-labs/blob/master/9-vscodespaces/README.md#create-a-codespace should reference a button labeled "Create a Codespace"

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

9-azure-cognitive-services sample changes

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run the sample "“9-azure-cognitive-services"

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 10

Versions

2004

Mention any other details that might be useful

  1. form_recognizer_client.begin_recognize_receipts_from_url(url=url) argument name has to change as receipt_url=url

  2. No attribute is available in “receipt” object
    print("Receipt Type: {} has confidence: {}".format(receipt.fields.get("ReceiptType").value, receipt.receipt_type.confidence))
    AttributeError: 'RecognizedReceipt' object has no attribute 'receipt_type'
    After the change the code like given below, its working fine
    receipt_type = receipt.fields.get("ReceiptType") ( refer the sample here : https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_recognize_receipts_from_url.py)


Thanks! We'll be in touch soon.

cc : @kaerm

Feedback on the Sentiment Analyzer Functions lab

This issue details my experience going through the lab at
https://github.com/Azure-Samples/azure-python-labs/blob/main/01-azure-functions-python-vscode/README.md

  • The supported Python versions weren't consistent through the lab. I have covered that in my recent pull request (#82), however.
  • I ran into the issue described by many in microsoft/pylance-release#2765 - it does work in the pre-release Python extension, however, so I'm guessing the plan is just to wait for that version to be the official version.
  • I got very confused about the missing Azure Functions Core Tools, but I discuss that in #82 as well.
    • I installed Azure Functions Core Tools v4, and got this warning: "Warning: Proxies are not supported in Azure Functions v4. Instead of 'proxies.json', try Azure API Management: https://aka.ms/AAfiueq"
  • I had some funky issue opening the localhost and then ran into a port collision, but I used lsof to identify the process number, killed it, re-started, and it did end up working. I don't think there's anything to fix here, just noting.
  • I was not able to follow https://github.com/Azure-Samples/azure-python-labs/blob/main/01-azure-functions-python-vscode/README.md in order to deploy the app. I kept getting stuck on the "Select a resource" step as it didn't show me any dropdown to select from nor did it let me type anything in. Maybe that has to do with my Azure account resources? Not sure.

Screen Shot 2022-05-24 at 12 16 26 PM

OS and Version?

Mac OS BigSur 11.6.6

Versions

Latest version of VSCode, Azure Functions v1.7.0
Azure Functions Core Tools v4

[01-postgres] Add instructions to allow-list the postgis extension

Error via Microsoft Open Source Discord:

File ".\azure-python-labs\01-postgres\pg-lab.py", line 30, in loadData
    cursor.execute('CREATE EXTENSION IF NOT EXISTS postgis')psycopg2.errors.FeatureNotSupported: extension "postgis" is not allow-listed for "azure_pg_admin" users in Azure Database for PostgreSQL
    HINT:  to see the full allow list of extensions, please run: "show azure.extensions;"

The extension will need to be allow-listed per https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions#how-to-use-postgresql-extensions

Arch Linux: Remote Extension Pack incompatible with VS Code 1.33.1

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  • Be running a current version of Arch Linux
  • Install what is supposedly the latest Visual Studio Code
    ("Official Binary Version" 1.33.1-1, last updated 2019-04-11 18:56)
  • Install the Python extension
  • Open Visual Studio Code
  • Press Ctrl-P
  • Paste ext install ms-vscode-remote.vscode-remote-extensionpack
  • Click Install on the newly listed Remote Extension Pack

Any log messages given by the failure

Unable to install because, the extension 'ms-vscode-remote.vscode-remote-extensionpack' compatible with current version '1.33.1' of VS Code is not found.

Expected/desired behavior

No error. Extension installs.

OS and Version?

Linux (Arch)

Versions

N/A but up-to-date

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.