我有一个linux服务器,我想每天运行一个python脚本来运行mysql过程,但是我不知道如何运行多个过程,如果有一个错误,它会向我发送一封电子邮件,其中包含错误的描述。下面是我的脚本,只有一个过程:
#!/usr/bin/python
import MySQLdb
# Open database connection
db = MySQLdb.connect("localhost","user","password","bddname" )
# prepare a cursor object using cursor()
嘿,我试着安装MySQL-Python大约5个小时了,但是一直收到错误。一开始是“找不到vcvarsall.bat”,还有一些关于我需要有visual C++ 2010的事情。所以在环顾四周之后,我为我的问题找到了一个“解决方案”…当我通过pip安装MySQL-Python时,只收到一个新的错误。
我使用的是python 3.4和Pycharm,在windows7上安装的是pip。
这是我在pip安装时得到的结果
> Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Building wheels for coll
这是我尝试过的:
$ easy_install-2.6 -d /home/user/lib/python2.6 MySQLdb
Searching for MySQLdb
Reading http://pypi.python.org/simple/MySQLdb/
Couldn't find index page for 'MySQLdb' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/
我是Django.我想使用Mysql数据库我的项目.我正在安装mysqlclient为此,但它显示在下面的错误.我使用--pip install mysql-python命令来安装mysqlclient
Collecting mysql-python Using cached MySQL-python-1.2.5.zip (108 kB) Using legacy setup.py install for mysql-python, since package 'wheel' is not installed. Installing collected packages:
我需要在Windows10上安装mysqldb for python,我尝试了下面的方法,但我得到了相同的错误:安装脚本退出时出现错误:命令'cl.exe‘失败:没有这样的文件或目录
pip安装mysqlclinet,easy_instal mysql-python
请帮帮我!
error: command 'cl.exe' failed: No such file or directory
E:\Python\Django-PyCharm\DjangoPyCharmWeb>easy_install mysqlclient
Searching for
我正在尝试安装mysql-python,我已经在pip中尝试了两种方法。
python -m pip install mysql-python
- This does not work saying "Failed Building Wheel for MySQL-Python"
下载MySQL_python-1.2.5-cp27-none-win_ and 64和MySQL_python-1.2.5-cp27-one-win 32的车轮,并尝试使用命令python -m pip install filename分别安装它们
- This does
我是Python和Python-Flask的新手,遇到了一个错误。我正在使用Ubuntu18.04.3LTS和Python 2.7.15+来构建一个python-flask web应用程序。
在安装flask-mysqldb时,我遇到一个错误。
$ pip install flask-mysqldb
完整输出:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained a
我正在使用pythonV3.7。我想为烧瓶应用程序安装mysql-python。我得到了ModuleNotFoundError: No module named 'MySQLdb',并在互联网上搜索,在那里我发现可以通过安装mysql-python或mysqlclient来解决这个问题。但是,当我试图使用命令安装mysql-python时,得到了以下错误。请帮忙解决这些问题。谢谢。
Defaulting to user installation because normal site-packages is not writeable
Collecting mysql-
我正在尝试通过pip下载MySql-python连接器,如下所示,但是我获得了一个error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
C:\Users\yschellekens.INTRANET\Desktop\Django project\general>pip install MySQL-
python
You are using pip version 7.1.0, however version 7.1.2 is available.
You should consider up
这是我第一次提出关于堆栈溢出的问题。
几天前,我一直在我的cpanel服务器上安装一个python应用程序。是关于我一直在做的django项目。所以我想用pip工具安装mysqlclient。
安装了cPanel、cloudlinux os、apache最新版本、python和ruby选择器
我已经绕过这个问题,从python3.7切换到3.6!但是我仍然想知道为什么我要用python3.7得到这些错误?
pip安装mysqlclient:
version node not found for symbol SSLeay@OPENSSL_1.0.1
/usr/bin/ld: f
我试过让它工作,但我没有成功。我正在尝试通过运行以下命令来安装mysql-python:
pip install mysql-python
但是我总是得到这样的错误
clang: error: invalid version number in '-mmacosx-version-min=10.11'
error: command 'clang' failed with exit status 1
我已经使用homebrew更新了所有的库,并且我已经安装了mysql。我还确保拥有最新的pip、xcode和xcode命令行工具。
我已经寻找了几个小时,但我还没有找