我正在尝试在pycharm中的ubuntu 14.04上安装metaplotlib并收到以下错误:
TypeError:unorderable类型:str()< INT()
ubuntu 14.04 64bits pycharm运行python 3
追溯是:
@Test
public void partial_binding() throws Exception {
Model model = mapper.readValue(Resources.getResource("partial_binding.json"), Model.class);
assertThat(model.name, equalTo("xyz"));
assertThat(model.columns, hasEntry("MEMO_TEXT", "yyy"));
assertThat(
mapper.writeValueAsString(model),
json(jsonObject()
.withProperty("Name", "xyz")
.withProperty("MEMO_TEXT", "yyy")
.withAnyOtherProperties()));
}
public static class Model {
@JsonProperty
private int _id;
@JsonProperty("Name")
private String name;
@JsonProperty("Age")
private int age;
private HashMap<String, String> columns;
@JsonAnyGetter
public HashMap<String, String> getColumns() {
return columns;
}
public void setColumns(HashMap<String, String> columns) {
this.columns = columns;
}
@JsonAnySetter
public void putColumn(String key, String value) {
if (columns == null) columns = new HashMap<>();
columns.put(key, value);
}
}
有人可以提供建议吗? 感谢
答案 0 :(得分:8)
我遇到了同样的错误,并且能够通过安装libfreetype6-dev和libpng12-dev来解决它。
sudo apt-get install libfreetype6-dev libpng12-dev
感谢@koukouviou指出上游错误报告,这大大加快了解决方案的发现过程。
答案 1 :(得分:1)
在matplotlib的github跟踪器中有一个关闭的issue。这不是matplotlib的问题,而是与其他软件包有关(讨论中提到了freetype和png)。
根据讨论,错误消息在主分支中更具描述性:
- 无法构建以下必需的包:* freetype,png