How to use Pyautogui in centos Docker to automate the UI and where to download the linux dependencies of pyautogui - pyautogui

How can I use Pyautogui in centos Docker to automate the UI? Also where can I download the linux dependencies of pyautogui (like scrot)?

Related

The Command Prompt is not recognizing http

I'm trying to install the Google App Engine.
I have Cloud SDK v260.0.0 and Python 2.7.9
When I run the command:
http://code.google.com/appengine/gcloud components install app-engine-python from the cmd
it gives me the error:
'http:' is not recognized as an internal or external command,
operable program or batch file.
What is going on?
I have Windows 10 and I'm running from the Directory:
C:\Users\MyName\AppData\Local\Google\Cloud SDK
Here is the Guide to install app engine for Python 2.
Since you mentioned that Python and Google Cloud SDK have been installed, you might start from step 3 to run the following command in your terminal for the gcloud component:
gcloud components install app-engine-python
As Yanan C stated you install app engine with:
gcloud components install app-engine-python
However, I had to remove the link in the beginning.
Change:
http://code.google.com/appengine/gcloud components install app-engine-python
To:
gcloud components install app-engine-python

MySQL for Pycharm

I'm creating a web application on pycharm using flask framework. i have to create database. i dont have any sql database in system and have no idea how it should be done. i want to know how it can done?
should i download MySQL first and then create db files in pycharm?
please guide me.
I have a suggestion,if you have install MySQL database,you follow this,open pycharm and click File->Settings->Project->Project Interpreter,then select your Python interpreter and click install button (the little green plus sign),input "MySQL-Python" and click the button "install package",you will install MySQL-Python successfully.If you have not install MySQL database,you need install MySQL database first.
Or you may go with.
From Windows Command Prompt / Linux Shell
install using wheel
pip install wheel
Download 32 or 64 Bit version from http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
64-Bit
pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl
32-Bit
pip install MySQL_python-1.2.5-cp27-none-win32.whl
Using Anaconda2:
Open a Command Prompt
$ conda install mysql-python
Press y to proceed with installation

Failed building wheel for mysql-python

I want to run a Django application in PyCharm which works on MySQL DB.
I am unable to connect my program to the database.
When I am trying to install MySQLclient or MySQL-python I am getting the error:
Failed building wheel for MySQLclient
Please help me out in connecting my Django program with MySQL database.
Edit
Please try installing the .whl file from http://www.lfd.uci.edu/~gohlke/pythonlibs/. This works every time. Just type pip install MySQL_python‑1.2.5‑cp27‑none‑win32.whl in the terminal.
Original Answer
I had the same issue. You might find these steps helpful.
Make sure you are in an activated virtualenv when you are installing anything through pip.
Before you install anything, type pip list in the terminal to see what you have installed in the virtualenv. It should have wheel, setuptools and pip.
This is the part that helped me, type pip install mysqlclient==1.3.9 or whatever version you want to install. This needs to happen before you install django.
Hopefully, it works and you can go ahead and install Django.
If these steps didn't work out for you, try installing MySQL-Python through the executable file here https://pypi.python.org/pypi/MySQL-python/1.2.5.
But this will only install mysql-python for you in the system. You can try pip list outside virtualenv to see if mysql-python is installed. If it is installed, then you have update this post so we can figure out a solution.
In the meantime some other fixes are:
Can't install mysql-python (newer versions) in Windows
Install Visual C++ for Python and add the bin folder to the PATH environment variable.
Make sure the mysql service is running in the background or is installed in your system by running mysql commands through the terminal.
Sometimes, two different instances of mysql service might cause this error i.e. if you have installed mysql server or any other product multiple times in the past, you might have to get rid of the ports the past services used. In this case, do a fresh installation of mysql server and add the ~\bin path to the PATH environment variable.
I had the same problem. I then uninstalled my python. Downloaded the python 3.6.5.
then used a command from
Python 3.7, Failed building wheel for MySql-Python
the command is pip install mysqlclient==1.3.12
In case you are using sqlalchemy(which implicitly uses mysql-python) to connect to a MySQL database, updating it using pip install sqlalchemy --upgrade might do the trick and while creating a connection using an engine the syntax should be:
from sqlalchemy import create_engine
HOST = "your_host_name.host.com"
USER = "your_username"
PASSCODE = "your_passcode"
DATABASE = "name_of_database"
engine = create_engine(f'mysql+mysqldb://{USER}:{PASSCODE}#{HOST}/{DATABASE}')
I found a solution to install mysqlclient on Windows 10 64 bit, Django version 3.10.0
Download preferred mysqlclient wheel for your OS/bit size. here :
https://pypi.tuna.tsinghua.edu.cn/simple/mysqlclient/
Point to the directory such as C:\Users\hp\Desktop\storefront\store from your prompt or terminal
install using pip i.e: C:\Users\hp\Desktop\storefront\store > pip install mysqlclient-2.1.0-cp310-cp310-win_amd64.whl
I hope this would help.I am running Python3.7 on windows 7 (32-bit). I had the same issue and tried using PIP commands from windows CLI. Although, my pip installation was successful but I was not able to add MYSQL or MYSQL-Connector-Python from Pycharm GUI. I used Pycharm Terminal for Below packages and was able to connect to MYSQL database.
Example:
(PTPT) C:\Windows\System32>pip3 install mysql-connector-python==8.0.29
Collecting mysql-connector-python==8.0.29
Downloading https://files.pythonhosted.org/packages/32/cd/1581bfe8f5ad7fd2aecdc499f0387227ad7912419384f9393b6205a764da/mysql_connector_python-8.0.29-py2.py3-none-any.whl (342kB)
|████████████████████████████████| 348kB 409kB/s
Requirement already satisfied: protobuf>=3.0.0 in c:\users\maghy\ptpt\lib\site-packages (from mysql-connector-python==8.0.29) (3.20.1)
Installing collected packages: mysql-connector-python
Found existing installation: mysql-connector-python 8.0.30
Uninstalling mysql-connector-python-8.0.30:
Successfully uninstalled mysql-connector-python-8.0.30
Successfully installed mysql-connector-python-8.0.29
WARNING: You are using pip version 19.3.1; however, version 22.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
pip install C:\Users\USER_NAME\Downloads\mysqlclient-1.4.6-cp37-cp37m-win32.whl
PYCHARM MYSQL PACKAGE

Continue after reboot Linux custom script - Azure ARM template

I am trying to build ARM JSON template and facing a problem with custom script extension and request for your help.
This is the sample script that I am executing as a part of virtual machine extensions (Linux).
#!/usr/bin/bash
export AZURE_STORAGE_ACCOUNT="$1"
export AZURE_STORAGE_ACCESS_KEY="$2"
AZURE_STORAGE_CONTAINER="$3"
yum update -y
reboot
yum install -y epel-release
yum install -y gcc gcc-c++ kernel-devel ksh m4 sshpass nodejs npm
With this script the VM was able to install updates and reboot. However the command "yum install -y epel-release" and following commands were not executed. And also while deployment this operation hangs and timeouts.
Can you help suggest how to solve this situation using JSON ARM template or custom script extension or using any Linux workaround ?
probably powershell dsc can help you achieve that (configure certain properties to force configuration to continue after reboot), or split your configuration into 2 scripts and deploy them independently of each other, so the first script reboots the machine, and after that second script should start working as soon as the VM becomes available and waagent talk to Azure.

How do I install pdftk on Openshift?

Is there a way to install pdftk on Openshift
It is available on Fedora and Centos - I tried yum and apt get but neither works
I need it for a Sinatra App I have
You will not be able to use yum on OpenShift Online, as you do not have root privileges. You can try downloading the source and compile/install it into your app-root/data directory, or enter your request to have it installed here: http://openshift.com/ideas