我正在设置张量流,并得到以下输出:
ERROR: matplotlib 1.3.1 requires nose, which is not installed.
所以我在做
sudo easy_install tornado
我得到了输出:
earching for tornado
Reading https://pypi.python.org/simple/tornado/
Download error on https://pypi.python.org/simple/tornado/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'tornado' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
No local packages or download links found for tornado
error: Could not find suitable distribution for Requirement.parse('tornado')
我该怎么办? 谢谢 法国的
错误:matplotlib 1.3.1需要鼻子,尚未安装。
答案 0 :(得分:0)
似乎您正在代理或防火墙后面运行命令。如果是这种情况,则需要设置相应的环境变量:
set http_proxy="username:password@host:port"
set https_proxy="username:password@host:port"
否则,您可以通过运行tornado
使用pip
安装--proxy
(如果您不在代理后面,则忽略pip --proxy http://user:password@proxy-host:port install tornado
):
sudo -H pip install --ignore-installed matplotlib
编辑:我建议运行
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 1000);
camera.position.set(0, 5, 10);
var renderer = new THREE.WebGLRenderer({
antialias: true
});
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var controls = new THREE.OrbitControls(camera, renderer.domElement);
scene.add(new THREE.GridHelper(10, 10, "white"));
var divisions = 100;
var points = [
new THREE.Vector3(-5, 5, 0),
new THREE.Vector3(-2, 2, 3),
new THREE.Vector3(1, 3, 2),
new THREE.Vector3(3, 5, -3),
new THREE.Vector3(-3, 4, -2)
];
var curve = new THREE.CatmullRomCurve3(points);
curve.closed = true;
var upperPoints = curve.getPoints(divisions);
var lowerPoints = upperPoints.map(p => {
return new THREE.Vector3(p.x, 0, p.z)
});
var upperGeom = new THREE.BufferGeometry().setFromPoints(upperPoints);
var lowerGeom = new THREE.BufferGeometry().setFromPoints(lowerPoints);
var cylGeom = new THREE.CylinderBufferGeometry(1, 1, 1, divisions, 1, true); // create an open-ended cylinder
cylGeom.attributes.position.array.set(upperGeom.attributes.position.array, 0); // set coordinates for upper points
cylGeom.attributes.position.array.set(lowerGeom.attributes.position.array, (divisions + 1) * 3); // set coordinates of lower points
cylGeom.computeVertexNormals();
var result = new THREE.Mesh(cylGeom, new THREE.MeshBasicMaterial({
color: 0xaaaaaa,
wireframe: true
}));
scene.add(result);
var upperLine = new THREE.Line(upperGeom, new THREE.LineBasicMaterial({
color: "aqua"
}));
scene.add(upperLine);
var lowerLine = new THREE.Line(lowerGeom, new THREE.LineBasicMaterial({
color: "yellow"
}));
scene.add(lowerLine);
renderer.setAnimationLoop(() => {
renderer.render(scene, camera);
});
以安装所需的软件包并忽略当前版本。