当我尝试安装memsql python库时遇到错误
我已经尝试了以下选项: sudo pip安装memsql
sudo pip install memsql --global-option = build_ext --global-option =“-I / usr / local / opt / openssl / include” --global-option =“-L / usr / local / opt / openssl / lib”
Installing collected packages: MySQL-python, memsql
Running setup.py install for MySQL-python ... error
Complete output from command /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-JDxMyP/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib install --record /private/tmp/pip-record-azfFw0/install-record.txt --single-version-externally-managed --compile:
running build_ext
building '_mysql' extension
creating build
creating build/temp.macosx-10.14-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/Cellar/mysql/8.0.15/include/mysql -I/usr/local/opt/openssl/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.14-intel-2.7/_mysql.o
_mysql.c:44:10: fatal error: 'my_config.h' file not found
#include "my_config.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'cc' failed with exit status 1}
答案 0 :(得分:0)
要安装 Ext.application({
name: 'Fiddle',
launch: function () {
var myPicker = Ext.create('Ext.picker.Date', {
renderTo: Ext.getBody(),
floating: true,
defaultAlign: 't-b',
minDate: new Date(),
});
Ext.create('Ext.form.Panel', {
title: 'Expression Builder',
width: 500,
bodyPadding: 100,
renderTo: Ext.getBody(),
items: [{
xtype: 'textfield',
fieldLabel: 'Expression',
width: 300,
allowBlank: true,
triggers: {
calendar: {
cls: 'x-fa fa-calendar',
handler: function (me) {
var text = this
myPicker.handler = function (picker, date) {
text.setValue(text.getValue() + ' ' + Ext.Date.format(this.getValue(), 'd/m/Y'));
this.hide();
};
myPicker.showBy(this);
}
}
}
}]
});
}
});
,您需要确保已具有依赖项。具体来说,您的环境中似乎缺少的依赖项是memsql-python
或等效的程序包。
注意-您正在覆盖包含路径,以指向openssl安装,这可能是由于编译器如何搜索开发标头而导致此问题的原因。
根据项目的自述文件,使用以下步骤在Ubuntu上快速入门:
libmysqlclient-dev
使用以下步骤开始使用基于RHEL的发行版,例如Amazon Linux或Centos:
sudo apt-get update
sudo apt-get install -y mysql-client python-dev libmysqlclient-dev python-pip
sudo pip install memsql
-编辑以解决有关在Mac OSX上安装的问题
在Mac上,似乎可以从brew安装sudo yum update
sudo yum install -y gcc mysql-devel
sudo pip install memsql
软件包,理论上应该提供libmysqlclient-dev软件包。一旦可用,请尝试安装memsql-python软件包而不覆盖链接器标志,因为memsql-python在没有openssl的情况下应该可以正常构建。如果需要opensl支持,则需要确保在编译时链接器可以使用openssl和libmysqlclient-dev共享对象。