Eclipse, Python and the Google SDK - python

How do I get Eclipse to load the Google python SDK?
I am using OSX 10.6, I have Eclipse (helios) and I have downloaded the GoogleAppEngineLauncher and the Eclipse plugin.
When I try to start a new web app project its asks for the SDK. I enter my location as follows:
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine
But all I get is Failed to initialize!
What I have Done wrong? any suggestions?

You shouldn't need to install the Google App Engine SDK/Launcher separately if using Eclipse. The Google Plugin for Eclipse will install the App Engine SDK/Launcher for you:
http://code.google.com/eclipse/
In the event you need to install them separately, it does appear you've got a space in your path between "Resources" and "GoogleApeEngine-default.bundle". Also, have you verified the path in question, the path to google_appenine, is valid?

Related

Azure Text to Speech Error: 0x38 (SPXERR_AUDIO_SYS_LIBRARY_NOT_FOUND) when deploying to Azure App Services Linux environment

I adapted the quick start code Python version here for Azure text to speech.
The app runs correctly on my local server. However, when I deploy the app through Visual Studio Code to Azure App Services, I got the error: 0x38 (SPXERR_AUDIO_SYS_LIBRARY_NOT_FOUND).
I found that this error is the same as the posts here and here. The reason seems to be that the Python interpreter used was from Microsoft Store instead of from Python.org. The solution, therefore, seems to be switching from the Microsoft Store version of Python to the Python.org version of python.
However, the solution above seems only work for those apps that run on a local or remote server. Since I am deploying my app to Azure App Services, and the deployment builds everything remote using oryx, I don't know how to switch from Microsoft Store version Python to the Python.org version python remotely.
I tried to change the Azure App Services Python version using Powershell, following the instruction from this post, but I was only able to change it from the current version of Python 3.9 to Python 3.8. When trying to change to version 3.10, I got an error message saying Python 3.10 is not supported.
After changing to Python 3.8, a new error was given:
ModuleNotFoundError at /
No module named '_speech_py_impl'
Thanks to #RajkumarMamidiChettu-MT for the instruction in the answer below. I think the solution is at the right direction. However, I got stuck at Step 3: My Azure app resource group is Linux (this seems to be default for Python apps and I can't change it). Therefore my kudu site does not have the UI of Debug Console and I cannot drag and drop my local Python package to the server. I do see that I have SSH and BASH interface. However, I don't know how and where to upload the package with either SSH or Bash.
Hopefully, someone can point me to the right direction. I feel I am getting so close.
For what it's worth, I found the Azure Text to Speech Error: 0x38 (SPXERR_AUDIO_SYS_LIBRARY_NOT_FOUND) error in my situation is because the deployment process was looking for the Linux version of Azure-Congnitiveservices-speech library, which ends with .so. However, for whatever reason, those .so library files were not generated when deploying my app to the Azure Linux environment. And the method mentioned in another post Azure Speech to text 0x38 (SPXERR_AUDIO_SYS_LIBRARY_NOT_FOUND) of manually pasting .dll (library files in windows) files to the execution path didn't work, because the web app environment is Linux, which is the default environment by Azure App Services for the Python web app. And there is no way to change the web app environment from Linux to Windows if using Azure's preconfigured web app environment to deploy a python app.
I was not able to figure out how to generate .so files for the Azure-Congnitiveservices-Speech pack with the default Linux environment. So I end up creating a custom Docker Windows Server container with Python 3.10, WindowsServer2019 (python:3.10.4-windowsservercore-1809 2022 is not supported at the time of this post), and then deploying it to Azure App Services with the customer docker container. It is working now.

PyCharm PRO for Mac GAE upload not working

My colleague and I both have Macs, and we both have PyCharm Professional, same version (2016.3.2) and build (December 28, 2016). We use a repository to keep our project directories in sync, and they are currently identical. Under Preferences, we both have "Enable Google App Engine support" checked, and we both have the same directory shown as "SDK directory", with the same files in that directory.
When I choose menu option Tools > Google App Engine > Upload App Engine app..., the App Config Tool panel appears at the bottom of my PyCharm window. The first line is:
/usr/bin/python
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/appcfg.py
update .
and the last line is:
appcfg.py >
I can also run that update command from a Terminal window.
Meanwhile, my colleague can also run the update command from a Terminal window. But when he runs menu option Tools > Google App Engine > Upload App Engine app..., the App Config Tool panel only shows:
appcfg.py >
We've researched this extensively and made many attempts at repair, no luck so far. Any help will be most appreciated.
I did a clean install recently, and not using the AppEngineLauncher anymore - not sure it even ships with the newer SDK.
My GAE is located here:
/usr/local/google-cloud-sdk/platform/google_appengine
Looks like you might be using an older version of AppEngine SDK

Configuring Google App Engine Python runtime on IntelliJ

I can't seem to be able to add the Google App Engine Python runtime on IntelliJ. I tried to add an additional Python SDK and configure my project to use that, but I can't find the correct Python runtime to point to.
Note that I'm not interested in using the PyCharm IDE, and want to maintain the polyglot IntelliJ IDE setup.
My setup:
IntelliJ Ultimate 13.1
Python plugin
Google App Engine Plugin
Google Cloud SDK
Relevant links:
https://cloud.google.com/sdk/
http://plugins.jetbrains.com/plugin/?id=631
https://www.jetbrains.com/pycharm/quickstart/appengine_guide.html
You probably solve this task and find right approach for you.
I'll just add my solution for this task for IntelliJ 2016 and later, probably earlier version too.
At first, I advise you to crate virtualenv. And install gcloud and Google App Engine itself using cloud toolkit.
Next, open in IDE your project by selecting proper folder.
Go to File > Project structure (Mac) and in Project Settings section > Project, in Project SDK drop-down choose /or set your newly crated virtualenv.
After that, go to Modules in the same section, and hit + sign. Choose New Module from context menu. Go to Python section, and there mark Google App Engine (Python) checkbox. Set your Application ID in proper field beneath checkbox list, and choose path to Google App Engine SDK. If you set SDK trough gcloud toolset, you can get right path by using gcloud info command in console by your favour. Path that you are looking for is Installation Root and add /platform/google_appengine to it.
Congratulations. You are good to go!

Google App Engine running in localhost environment on Mac

I did a bunch of research on this and could not find an answer to my specific problem, although it seems allot of people have been plagued with similar problems.
I am new to Google App Engine and just created an account. I downloaded the SDK for Python 2.7. I deployed the Hello, World! to the supplied appspot.com address and it prints hello world just fine. When I try to run it in my localhost it gives a 500 server error.
I tried creating a few different applications and messing with the port settings, the app.yaml file, and the main.py file. Still cant get it to work.
Im running on an Mac and I did download and install Python 2.7 to ensure I have the latest version. Im also new to Python and App Engine. I come from the world of PHP and XAMPP.
Does anybody have any ideas?
You should try Python 2.7.4 which is the version Google links to and run a PHP version compiled with the same modules and option that GAE as well.
Here's a video with the steps
http://www.youtube.com/watch?v=IFuNNddWQIo

how to get started with google app-engine?

I m starting to build python application in windows platform using google appengine
whats the steps to debug and run my application
On Windows I use Aptana.
Once you've installed that, run it, go to the Plugins tab and get Pydev.
Pydev has inbuilt support for google app engine - so you can create an app engine project, and then run or debug it. See these posts for more details:
http://pydev.blogspot.com/2009/05/testing-on-pydev-146-google-app-engine.html
http://pydev.blogspot.com/2009/05/pydev-146-released-google-app-engine-on.html

Categories

Resources