安装pyspider-“ python setup.py egg_info”失败,错误代码为1

时间:2019-09-19 06:23:58

标签: python linux pip debian chromebook

我正在尝试在Debian GNU / Linux 9上安装pyspider。尝试使用pip和pip3进行安装,检查了libevent-dev,libpython-dev,python-dev,distribution,ez_setup,但我仍然从pip收到以下消息/ pip3安装pyspider:

Command "python setup.py egg_info" failed with error code 1 in tmp/pip-build-<randomcharacters>/pycurl/

在该错误消息的正上方,它说:

__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config'

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

class Square { constructor(name, cellsSize, mode, circleRadius, dragHandler, releaseHandler) { if(!cellsSize){ return false;} let x = (cellsSize/2)-circleRadius, y = mode == 'BOTH' ? (cellsSize/2)-circleRadius : cellsSize - circleRadius; this.value = "SATYA"; this.name = name; this.pan = new Animated.ValueXY(); this.cellsSize = cellsSize; this.mode = mode; this.minXY = 0 - CIRCLE_RADIUS; // 50; //this.cellsSize * (0.5); this.maxXY = cellsSize - CIRCLE_RADIUS; //this.cellsSize * (1.5); this.halfW = cellsSize/2; this.halfH = mode == 'BOTH' ? cellsSize/2 : 0; this.finalX = 0; this.finalY = 0; this.constrainedX = this.pan.x.interpolate({ inputRange: [this.minXY, this.maxXY], outputRange: [this.minXY, this.maxXY], extrapolate: 'clamp', }); this.constrainedY = this.pan.y.interpolate({ inputRange: [this.minXY, this.maxXY], outputRange: [this.minXY, this.maxXY], extrapolate: 'clamp', }); this.pan.setValue({ x, y }); this.panResponder = this._buildPanResponder(); this.dragCallback = dragHandler; this.releaseCallback = releaseHandler; } get valueString() { return "ijkl"; } get panRef() { return this.pan; } get panResponderRef() { return this.panResponder; } dragHandler(gesture, event) { const{ nativeEvent } = event; const{ halfW, halfH, cellsSize, mode } = this; let finalX = 0, finalY = 0, normalizedX = 0, normalizedY = 0, dirX = 1, dirY = 1; dirX = gesture.dx > 0 ? 1 : -1; dirY = gesture.dy > 0 ? 1 : -1; if( mode == 'BOTH' || mode == 'X'){ //Locked X axis normalizedX = Math.abs(gesture.dx) > halfW ? ( dirX*halfW ) : gesture.dx; finalX = halfW+normalizedX; finalX = Math.round(finalX*100)/100; } if(mode == 'BOTH' || mode == 'Y'){ // Locked Y axis normalizedY = Math.abs(gesture.dy) > halfH ? ( dirY*halfH ) : gesture.dy; finalY = cellsSize - (halfH+normalizedY); finalY = Math.round(finalY*100)/100; } if( mode == 'X' || mode == 'FREE' ){ //Free Y axis normalizedY = gesture.dy; finalY = (halfH+normalizedY) > cellsSize ? dirY*cellsSize : (halfH+normalizedY); finalY = (Math.abs(finalY) > cellsSize) ? dirY*cellsSize : finalY; // Cap the top end to max finalY = (finalY > 0) ? 0 : finalY; // Cap the bottom to min finalY = Math.round(finalY*100)/100; } this.finalX = finalX; this.finalY = finalY; this.dragCallback({ name: this.name, x: toFixed(this.finalX/cellsSize, true), y: toFixed(this.finalY/cellsSize, true) }); return; } releaseHandler(gesture, event) { const { dy } = gesture; const { cellsSize } = this; if(this.mode === 'X'){ // is it up if( dy < 0 ){ this.halfH = (this.halfH + gesture.dy); if ( Math.abs(this.halfH) > cellsSize) { this.halfH = -1 * cellsSize; } } if( dy > 0 ){ if(Math.abs(this.halfH) < dy){ this.halfH = 0; //move to ground } else { this.halfH = this.halfH + dy; } } } if(this.mode == 'BOTH'){ this.finalX = (cellsSize/2); ///cellsSize; this.finalY = (cellsSize/2); ///cellsSize; } if(this.mode == 'X'){ this.finalX = (cellsSize/2); ///cellsSize; this.finalY = this.finalY; } this.releaseCallback({ name: this.name, x: toFixed(this.finalX/cellsSize, true), y: toFixed(this.finalY/cellsSize, true) }); // console.log(this.halfH); } _buildPanResponder() { return PanResponder.create({ onStartShouldSetPanResponder: () => true, onPanResponderGrant: (event, gestureState) => { this.pan.setOffset({ x: this.pan.x._value, y: this.pan.y._value }); }, onPanResponderMove: Animated.event([null, { //Step 3 dx : this.pan.x, dy : this.pan.y }] ,{ listener: (e, gesture) => { this.dragHandler(gesture, e); } } ), onPanResponderRelease: (event, gesture) => { const { dy } = gesture; const { halfH, cellsSize, mode } = this; if(mode == 'BOTH'){ this.pan.setValue({ x: 0, y: 0 }); }else{ let value = dy; if(dy < 0){ value = (Math.abs(this.halfH+gesture.dy) > this.cellsSize) ? (Math.abs(halfH + dy) - cellsSize) - Math.abs(dy) : dy; } if( dy > 0 ){ if(Math.abs(this.halfH) < dy){ value = Math.abs(this.halfH); } else { value = dy; } } this.pan.setValue({ x: 0, y: value }); } this.pan.flattenOffset(); this.releaseHandler(gesture, event); } }); } } https://i.stack.imgur.com/bb3vf.png,后者依次为requires pycurl。因此,请先安装requires libcurl

pyspider
相关问题