missing python language when i created azure function - python

I'm new for azure. i just tried to create azure function for python script, but under language list, python language is missing.

Firstly, you need create the Linux OS Function, for now the Python is not support on Windows OS. So when you create the Function you should choose the Linux OS then you will be able to choose the Python stack.
Secondly, after you create the function, for now in-portal file editing this feature is disabled, You could check this issue:In-portal editing will be disabled for Python Functions. So you have to use the Azure Functions Core Tools or VS Code extension. Then upload the local function to Azure.

You can use VS CODE for the same . Visual Studio 2017/2019 only supports C#.
You can install the package for VS CODE WITH
sudo apt-get install python3-venv

Related

How do I install Gimp-Python on windows?

I try to write a simple plugin with gimpfu in python and I tried following those instructions.
1.2. Installation
Gimp-python consists of a Python module written in C and some native python support modules. You can build pygimp with the commands:
./configure
make
make install
This will build and install gimpmodule and its supporting modules, and install the sample plugins in gimp's plugin directory.
Where do I have to execute those commands?
I tried adding my script to the plugins folder but it seems like there is no python module called gimpfu. I believe I have to enable or install it in some way, but I can't find a solutio to do it.
EDIT: It seems like gimpfu is availible in the gimpfy-console insode gimp. It just doesn't seem to be availible for my plugin scripts.
No need to install anything. In the Windows versions Python support is built-in, and the gimpfu import is available when your code is executed by Gimp.
If you don't see the plugin in the menu it is likely a syntax error that doesn't let it run its registration code. See here for some debugging techniques.
However, since you mention PyCharm, you may have another Python interpreter installed and this makes things complicated because there can be conflicts depending on order of installation (and remember, Gimp uses Python 2.7)
Now it all depends if you are really doing a plugin (called from the Gimp menu) or a batch (where Gimp is called from a shell script), which is somewhat different. If you are writing a batch, see this answer for an example.
you don't need to install anything, on windows gimp comes with a python interpreter along with the libraries inside of it.
if you want to run your script from inside GIMP then you should check this answer and you should add the path to gimp to your system PATH environment variable (which is C:\Program Files\GIMP 2\bin on my system) , and instead of calling gimp-console.exe you should replace that with whatever gimp-console is currently available in that folder, the one on my system is gimp-console-2.10.exe.

How to embed python into a kotlin/java Android app?

I have an Android app written in kotlin that needs to call python code. I would like the app to come bundled with the necessary python binaries to execute some python scripts as well as the required python libraries, ideally managed by pip in a virtual environment.
I already have some code that will copy these files from the assets folder that is bundled into the APK when building the app, but I don't know where to find recent python binaries that can run natively on Android. I'm assuming I need something like a arm64 version of python >3.7 .
A second issue I have is that I'm developing the app on Windows, so the virtual environment and some dependencies are not cross platform. I would probably need a way to either automatically convert the windows virtualenv into a valid project structure with correct dependencies, or a way to create and manage a linux virtual environment from Windows (maybe WSL can save me here).
What is the preferred method? Are there open source Android apps that have solved similar issues?

Creating Python Azure Function in Visual Studio 2015 doesn't auto-create "Python Environments" file

I am using Visual Studio 2015 and have downloaded the Python Azure Functions tools and have been following this documentation on creating a Python Azure Function (the docs show the creation of a C# function, but I chose "Python" in the dropdown menu).
However, I created the function app and function and don't see a Python Environments file:
What I'm seeing:
The Python Environments file I want:
Thus, my questions:
What do I need to do to get the Python Environments file to show up?
How can I install an external library to my Azure Function environment? (This one: https://github.com/JohannesBuchner/imagehash)
The answer to this is similar to the answer here: https://social.msdn.microsoft.com/Forums/en-US/0eec433c-863c-4017-b63c-9d50f2051fcc/issues-with-sqlalchemy-on-python-azure-functions?forum=AzureFunctions
To copy it here:
Virtual environments are not supported with the Functions v1 runtime.
Refer to the link below to learn how to install a custom version of
Python and use third party modules with it -
https://ourwayoflyf.com/running-python-code-on-azure-functions-app/
Make sure the version of sqlalchemy you're installing is compatible
with your version of Python installed.
Please note that this feature is currently 'experimental' and we don
not recommend or support it for production scenarios. We're currently
working on first-class Python support for the v2 runtime which will
make this scenario a lot easier -
https://github.com/Azure/azure-functions-python-worker

How can I make sure the windows update package installed successfully

I write a code in python that simulates a Windows Update installation.
the code is below:
subprocess.call(["c:\Windows\System32\wusa.exe","C:/Users/adib/Downloads/WindowsUp.msu", "/quiet")
Now, I would like to know when the installation over and make sure the update ran successfully..
how can I do that through the script?
thanks!!
Windows update has a COM API that can be used to scan for and install updates. VBScript is listed as explicitly supported; python may also be able to access COM interfaces. Detailed examples in VBscript can be found in Microsoft's documentation.
For more information You should take a look at this topic: Download / Install Windows Updates from Python

How to setup airflow with python for a windows development environment

At work we are completing a PoC of Airflow by AirBnB. Standard operating practice is to decouple the development (i.e. DAG creation and python scripts etc) from the runtime environment. I.e. we are not allowed to script directly on the servers (bad practice anyway).
As such, I have configured intelliJ to work with Python (works as expected) in Windows (we are not allowed to have unix workstations) but I cannot find a way to install airflow in Windows. I am new to Python with a Java development background.
As such, how do I setup a local development environment IDEA ultimate for AirBnb/Airflow (there is no documentation ?
I have it working and compiling with the following step:
The steps below are for using intelliJ Ultimate edition, download the python modules.
Download the python extension for InttelliJ Ultimate edition or PyCharm
Configure and install python 2.7 for Windows.
Add the SDK to IDEA
Configure the following proxy details in environment variables to install modules using PIP ->
HTTP_PROXY=http : // user:password#your-company-proxy.com:8080
HTTPS_PROXY=http : // user:password#your-company-proxy.com:8080
(remove spaces, not allowed to post multiple links)
Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
Get it from http://aka.ms/vcpython27
C:_downloads>msiexec /i VCForPython27.msi ALLUSERS=1
pip install airflow
Create a new project, configure it as a python module.
Download the GIT repository -> airflow
Configure your path correctly, also set a python home and AIRFLOW_HOME.

Categories

Resources