我遇到以下问题,我正在使用命令
module powerbi.extensibility.visual {
interface DataPoint {};
interface ViewModel {
dataPoints: DataPoint[];
};
export class Visual implements IVisual {
private host: IVisualHost;
private svg: d3.Selection<SVGAElement>;
private barGroup: d3.Selection<SVGAElement>;
private divContainer: d3.Selection<HTMLDivElement>;
private table: d3.Selection<HTMLTableElement>;
private tbody: d3.Selection<HTMLTableRowElement>;
private thead: d3.Selection<HTMLTableHeaderCellElement>;
private HeadColumns = [];
constructor(options: VisualConstructorOptions) {
options.element.style.overflow = 'auto';
this.host = options.host;
this.divContainer = d3.select(options.element)
.append("div")
.classed("divContainer", true)
.attr("width", "100%")
.attr("height", "100%");
this.table = d3.select(".divContainer")
.append("table")
.classed("hello", true)
.style("background-color", "#72B6E7")
.attr("width", "100%")
.attr("height", "100%");
this.thead = d3.select("table")
.append("thead");
this.tbody = d3.select("table")
.append("tbody");
}
public update(options: VisualUpdateOptions) {
let ViewModel = this.getViewModel(options);
let width = options.viewport.width;
let height = options.viewport.height;
//Creates Header Column Names
this.thead.selectAll("th")
.data(this.HeadColumns)
.enter()
.append("th")
.text(function(d) { return d; });
//Creats Rows
let rows = this.tbody.selectAll("tr")
.data(ViewModel.dataPoints)
rows.enter().append("tr");
rows.exit().remove();
let cells = rows.selectAll("td")
.data(function(row) {
return d3.map(row).values();
})
.enter()
.append("td")
.text(function (d) {
return d;
});
}
private getViewModel(options: VisualUpdateOptions): ViewModel {
let dv = options.dataViews;
let viewModel: ViewModel = {
dataPoints: [],
};
let Table = dv[0].table
let TableRows = Table.rows
let TableLen = Table.rows.length
let TableColumnNumber = Table.columns.length
let TableColumns = []
this.HeadColumns = [];
for (let i = 0, len = TableColumnNumber; i < len; i++){
let tmp = {};
tmp["ColumnName"] = Table.columns[i].displayName;
this.HeadColumns.push(Table.columns[i].displayName);
TableColumns.push(tmp);
}
for (let i = 0, len = TableLen; i < len; i++){
var tmp_ = {};
for (let k = 0, len = TableColumns.length; k < len; k++){
tmp_[TableColumns[k].ColumnName] = <string>TableRows[i][k];
}
viewModel.dataPoints.push(tmp_);
}
return viewModel;
}
}
}
我遇到的问题是在安装过程中未维护代理变量。尝试安装setuptools时,它不再具有代理地址。我尝试在我的环境变量中使用pip install pyinstaller --proxy=http://webdefence.global.blackspider.com:80 --trusted-host=pypi.python.org
和HTTP_PROXY
,但没有运气。还有其他方法来设置将通过pip安装维护的代理吗?
我已经使用-vvv来产生更多错误详细信息-粘贴在HTTPS_PROXY
gist.github.com/blaggrob/19e7afcae2b4f1d36139fbf0a88a6651
答案 0 :(得分:4)
您可能会遇到新的PEP 518 support implementation的错误,该错误中,为安装构建时依赖性而创建的隔离构建环境缺少必要的代理配置。
您可以通过在命令行上使用--no-build-isolation
,在配置文件中设置no-build-isolation=no
或通过设置PIP_NO_BUILD_ISOLATION=no
环境变量来绕开新功能(是的,这最后两个选项是counter-intuitive)。
这确实要求先安装setuptools
和wheels
,然后才能安装pyinstaller
。
我已经filed a new issue with the pip
project进行了跟踪,我不相信它已经被报道过。