[英]Error connecting Python with MySQL
我收到了一個python項目,但在運行其要求時遇到了麻煩,尤其是與MySQL有關的任何事情。 每當我運行pip install mysqlclient
,我都會收到13條警告,並且此錯誤以紅色顯示。
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-eBsQYy/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-sxHiel-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-eBsQYy/mysqlclient/
當我運行pip install mysql-python
我收到14條警告,紅色類似的錯誤。
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-qW79lT/mysql-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-13maVa-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-qW79lT/mysql-python/
有任何想法嗎?
嘗試安裝“ pymysql”。 嘗試在Python 3中為Python安裝MySQL的同時,我也得到了警告。進行一些研究后,pymysql似乎是今后需要安裝的東西。 pip安裝pymysql。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.