无法在Mac OS X 10.9上安装Lxml(Cannot install Lxml on Mac os x 10.9)
我想安装Lxml,所以我可以安装Scrapy。
当我更新我的Mac今天不会让我重新安装lxml,我得到以下错误:
In file included from src/lxml/lxml.etree.c:314: /private/tmp/pip_build_root/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found #include "libxml/xmlversion.h" ^ 1 error generated. error: command 'cc' failed with exit status 1
我已经尝试使用brew安装libxml2和libxslt,都安装正常,但我仍然无法安装lxml。
最后一次安装我需要启用Xcode上的开发工具,但从Xcode 5更新到现在,它不再给我这个选项了。
有谁知道我需要做什么?
I want to install Lxml so I can then install Scrapy.
When I updated my Mac today it wouldn't let me reinstall lxml, I get the following error:
In file included from src/lxml/lxml.etree.c:314: /private/tmp/pip_build_root/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found #include "libxml/xmlversion.h" ^ 1 error generated. error: command 'cc' failed with exit status 1
I have tried using brew to install libxml2 and libxslt, both installed fine but I still cannot install lxml.
Last time I was installing I needed to enable the developer tools on Xcode but since its updated to Xcode 5 it doesnt give me that option anymore.
Does anyone know what I need to do?
原文:https://stackoverflow.com/questions/19548011
最满意答案
你可以这样做(jQuery的点击处理程序,但任何框架工作的重要部分):
$(selector).click(function(e) { if(e.shiftKey) { //Shift-Click } if(e.ctrlKey) { //Ctrl+Click } if(e.altKey) { //Alt+Click } });
只要处理任何你想要的内部,
if
在点击处理程序内,就像我上面。You can do something like this (jQuery for the click handler, but any framework works on the part that matters):
$(selector).click(function(e) { if(e.shiftKey) { //Shift-Click } if(e.ctrlKey) { //Ctrl+Click } if(e.altKey) { //Alt+Click } });
Just handle whichever you want inside an
if
inside the click handler like I have above.
相关问答
更多-
你可以这样做(jQuery的点击处理程序,但任何框架工作的重要部分): $(selector).click(function(e) { if(e.shiftKey) { //Shift-Click } if(e.ctrlKey) { //Ctrl+Click } if(e.altKey) { //Alt+Click } }); 只要处理任何你想要的内部, if在点击处理程序内,就像我上面。 You can do something like this (jQ ...
-
那么你不会在所有浏览器中工作,只是IE 8.微软实现了确定按下(右/左)键的能力。 这是一个链接http://msdn.microsoft.com/en-us/library/ms534630(VS.85).aspx 我还发现这个关于keypress,keyup,keydown事件在浏览器的奇迹文章。 http://unixpapa.com/js/key.html $('#someelement').bind('click', function(event){ if(event.ctrlKey) ...
-
从jQuery版本1.1.3, event.which规范化event.keyCode和event.which ,所以你不必担心浏览器兼容性问题。 事件文件 event.which将分别给左,中,右鼠标按1,2或3键: $('#element').mousedown(function(event) { switch (event.which) { case 1: alert('Left Mouse button pressed.'); ...
-
你想使用e.button属性来检查被调用的鼠标事件。 IE中点击鼠标左键的值不同 。 你的代码如下所示: var left, right; left = mie ? 1 : 0; right = 2; document.body.addEventListener('mousedown', function (e){ if(e.button === left){ Player1.isLeftClick = true; } else if(e.button === ri ...
-
尝试这样的事情。 protected override void WndProc(ref Message m) { const int WM_LBUTTONDBLCLK = 0x0203; switch (m.Msg) { case WM_LBUTTONDBLCLK: { if (Control.ModifierKeys.HasFlag(Keys.S ...
-
在MouseDown事件处理程序中检测Ctrl + Left(鼠标按钮)(Detecting Ctrl+Left (mouse button) in MouseDown event handler)[2022-10-14]
Keys.None的值为0,因此单独使用时很难检测到“无按键”。 这个: void Form1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left && (ModifierKeys & Keys.None) == Keys.None) { MessageBox.Show("No key was held down."); ... -
使用mousedown事件而不是click事件并实现所有需要的行为 如何用jQuery区分鼠标左键和右键 $('.itemLink').mousedown(function(event) { switch (event.which) { case 1: alert('Left mouse button pressed'); break; case 2: alert('Middle mouse bu ...
-
为什么按shift和向前滚动会触发鼠标单击事件(Why does pressing shift and scrolling forward fire the mouse click event)[2021-07-06]
使用((HandledMouseEventArgs)e).Handled = true; 在MouseEventArgs中防止选择问题。 Use ((HandledMouseEventArgs)e).Handled = true; in the MouseEventArgs to prevent the selection issue. -
事件对象告诉您是否按下了shift键并且在附加事件时没有“打开”。 button.addEventListener("contextmenu", function(e) { console.log(e.shiftKey); }); The event object tells you if the shift key is pressed and there is no "on" when you are attaching the event. button.addEventListener ...
-
而不是控制尝试使用[Shift]按钮。 来自StarUML用户指南 - “您可以通过在区域上拖动鼠标来选择多个元素。在按住[Shift]键的同时单击视图元素,将元素添加到选区中。” Instead of control try using the [Shift] button. From StarUML User Guide - "You may select multiple elements by dragging the mouse over an area. Click the view eleme ...