Abstract. The Ptolemy variety for SL(2, C) is an invariant of a topological ideal triangulation of a compact 3-manifold M . It is closely related to Thurston's gluing equation variety. The Ptolemy variety maps naturally to the set of conjugacy classes of boundary-unipotent SL(2, C)-representations, but (like the gluing equation variety) it depends on the triangulation, and may miss several components of representations. In this paper, we define a Ptolemy variety, which is independent of the choice of triangulation, and detects all boundary-unipotent irreducible SL(2, C)-representations. We also define variants of the Ptolemy variety for PSL(2, C)-representations, and representations that are not necessarily boundary-unipotent. In particular, we obtain an algorithm to compute all irreducible SL(2, C)-characters as well as the full A-polynomial. All the varieties are topological invariants of M .